:root {
  --background: #faf8f5;
  --text: #211e1b;
  --muted: #77716b;
  --accent: #bf4b17;
  --line: #e9e3dc;
}
[hidden] { display: none !important; }
body {
  display: block;
  padding: max(38px, env(safe-area-inset-top)) 26px max(28px, env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 100% 0, #fff0dc 0, transparent 42%), var(--background);
}
.download-card {
  width: min(100%, 420px);
  margin: 4vh auto 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.download-card[aria-hidden="true"] { visibility: hidden; }
.brand { display: block; text-align: left; }
.logo-box, .loading-logo {
  width: 96px;
  height: 96px;
  padding: 6px;
  border: 1px solid #eee5da;
  border-radius: 23px;
  background: #fff;
  box-shadow: 0 7px 22px #6f381008;
}
.logo-box img, .loading-logo img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
}
.brand-label {
  display: block;
  margin-top: 28px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
}
.brand h1 {
  margin-top: 14px;
  font-size: clamp(36px, 10vw, 46px);
  line-height: 1.23;
  font-weight: 700;
  letter-spacing: -1.5px;
}
.brand h1 span { color: #74665b; }
.brand p { margin-top: 16px; font-size: 13px; line-height: 1.8; }
.download-options { gap: 14px; margin-top: 36px; }
.download-btn {
  min-height: 88px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 3px 12px #211e1b03;
}
.platform-icon { width: 42px; height: 42px; border-radius: 12px; background: #f6f3ef; }
.platform-icon img { width: 25px; height: 25px; filter: brightness(0); opacity: .87; }
.platform-copy { gap: 7px; }
.platform-copy strong { font-size: 18px; font-weight: 650; }
.platform-copy small { color: var(--muted); font-size: 11px; }
.button-arrow { color: #9a8c80; font-size: 27px; }
.download-btn.is-recommended {
  color: var(--text);
  background: linear-gradient(115deg, #fff9f0, #fffdfa);
  border-color: #e7b38a;
  box-shadow: 0 5px 18px #c36b1610;
}
.download-btn.is-recommended::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 26px;
  bottom: 26px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #d66b2d;
}
.is-recommended .platform-icon { background: #ffebd5; }
.is-recommended .button-arrow { color: var(--accent); }
.download-btn.is-recommended .platform-badge { display: none; }
.download-btn[aria-busy="true"] .button-arrow {
  width: 17px;
  height: 17px;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  border: 2px solid #ead9cb;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: button-spin .8s linear infinite;
}
.download-btn.is-loading .platform-copy strong { font-size: 18px; }
.download-btn.is-loading .platform-copy strong::after { content: none; }
.page-note {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
  text-align: left;
}
.browser-notice, .download-help {
  margin-top: 22px;
  padding: 19px;
  border: 1px solid var(--line);
  background: #fffdfa;
  border-radius: 14px;
}
.browser-notice { border-color: #e9c9a8; }
.notice-label { color: var(--accent); font-size: 10px; letter-spacing: 2px; }
.browser-notice h2 { margin-top: 9px; font-size: 18px; }
.browser-notice p, .download-help p, .download-help label {
  color: #6b6259;
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.browser-notice p { margin-top: 10px; }
#copyDownloadLink {
  width: 100%;
  min-height: 44px;
  margin-top: 16px;
  border: 1px solid #d6c1ae;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
#copyResult:empty, #helpCopyResult:empty { display: none; }
#manualCopy, #helpManualCopy { margin-top: 12px; }
#manualCopy label { font-size: 11px; }
#downloadLinkField, #helpDownloadLinkField {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #dccfc2;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
}
.download-help-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.download-help button, .download-help-actions a {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #d9cdc1;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.download-help-actions a { display: inline-flex; align-items: center; text-decoration: none; }
button:focus-visible, input:focus-visible, .download-help-actions a:focus-visible {
  outline: 3px solid #d18a54;
  outline-offset: 3px;
}
.loading-progress { background: #eae0d5; }
.loading-panel h1 { color: var(--text); }
#loadingRetry { border-radius: 10px; }
@keyframes button-spin { to { transform: rotate(360deg); } }
@media (hover: hover) and (pointer: fine) {
  .download-btn:hover { background: #fff; border-color: #cfb9a3; }
  .download-btn.is-recommended:hover { background: #fff4e5; border-color: #d8894c; }
}
@media (max-width: 350px) {
  body { padding-left: 20px; padding-right: 20px; }
  .download-btn { padding: 17px 16px; gap: 12px; }
}
@media (max-height: 700px) {
  body { padding-top: max(24px, env(safe-area-inset-top)); }
  .download-card { margin-top: 0; }
  .brand-label { margin-top: 22px; }
  .download-options { margin-top: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .download-btn[aria-busy="true"] .button-arrow { animation: none; }
}
