/* Shared buttons (2026-10-11, Toss-style): solid, rounded, with a press that shrinks and darkens,
   deepens while held, and springs back on release. Kept identical to public/ui-buttons.css
   (static pages); tests/ui-buttons.test.js checks the copy. Social login buttons are never matched. */
/* Selectors start with "html body" so they win over older button rules whatever order the
   production bundle emits the CSS chunks in (the dev server keeps import order; the build does not). */
/* Quick taps on 다음 zoomed the page on iPhone (2026-10-18). manipulation drops double-tap zoom only; pinch zoom stays. */
html { touch-action: manipulation; }
:root {
  --ubb-gold: #e2c38c; --ubb-gold-press: #d4b277; --ubb-on-gold: #1c1408;
  --ubb-surface: #272b40; --ubb-surface-hover: #30354d; --ubb-on-surface: #f3efe7;
  --ubb-tint: rgba(226, 195, 140, .24); --ubb-on-tint: #f5dcae; --ubb-radius: 14px;
}

/* Main actions */
html.flow-landing body .button-dark, html.flow-landing body .topic-show-all, html body #reading-flow .flow-next, html body #reading-flow .flow-submit, html body #reading-flow .deck-start, html body .clear-reading-home, html body #public-topic-start, html body.ubb-page button:not(.secondary):not(.link):not([class*="auth-"]) {
  background: var(--ubb-gold) !important; color: var(--ubb-on-gold) !important;
  border: 0 !important; border-radius: var(--ubb-radius) !important; font-weight: 700 !important;
  box-shadow: none !important;
}
/* Secondary actions */
html.flow-landing body .public-share-button, html.flow-landing body .site-header .auth-open,
html body #reading-flow .deck-skip, html body #reading-flow .input-footer .input-skip, html body #reading-flow .flow-secondary,
html body #reading-flow .flow-nav a, html body #reading-flow .flow-privacy button,
html body #public-topic-actions .public-share-button,
html body.ubb-page button.secondary {
  background: var(--ubb-surface) !important; color: var(--ubb-on-surface) !important;
  border: 0 !important; border-radius: var(--ubb-radius) !important; font-weight: 600 !important;
}
/* Share is an icon since 2026-10-20: as tall as the start button beside it, about square, so the side padding never squeezes the icon. */
html body #public-topic-actions .public-share-button { align-self: stretch; width: 60px; min-width: 50px; height: auto; min-height: 50px; margin: 0; padding: 0 !important; }
html.flow-landing body .site-header .auth-open { border-radius: 999px !important; }
/* Small in-card actions, like Toss's "방문하기" */
html.flow-landing body .topic-card-action, html.flow-landing body .full-tarot-card .catalog-action {
  background: var(--ubb-tint) !important; color: var(--ubb-on-tint) !important;
  border-radius: 12px !important; padding: 8px 14px !important; font-weight: 700 !important;
  display: inline-flex !important; align-items: center; width: auto !important; align-self: flex-start !important;
}
/* List cards have no share icon since 2026-10-22, so the pill may use the whole row (it was clipped to "읽" while a 54px slot stayed empty). */
html.flow-landing body .topic-card-action, html.flow-landing body .full-tarot-card .catalog-action {
  max-width: 100%; white-space: nowrap;
}
/* Topic tabs */
html body .home-topic-tabs .topic-filters button {
  background: transparent !important; border: 0 !important; border-radius: 999px !important;
  color: var(--ubb-on-surface) !important;
}
html body .home-topic-tabs .topic-filters button[aria-pressed="true"] {
  background: var(--ubb-gold) !important; color: var(--ubb-on-gold) !important; font-weight: 700 !important;
}

/* Press feel for everything above */
html.flow-landing body .button-dark, html.flow-landing body .topic-show-all, html.flow-landing body .public-share-button,
html.flow-landing body .site-header .auth-open, html.flow-landing body .topic-card-action, html.flow-landing body .catalog-action,
html body .home-topic-tabs .topic-filters button, html body #reading-flow button, html body .clear-reading-home, html body.ubb-page button,
html body #public-topic-start, html body #public-topic-actions .public-share-button,
html body #reading-flow .flow-next, html body #reading-flow .flow-secondary, html body #reading-flow .flow-nav a, html body .bottom-navigation a {
  -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none;
  transition: transform .42s cubic-bezier(.34, 1.56, .64, 1), filter .25s ease, background-color .2s ease;
}
html.flow-landing body .button-dark:active, html.flow-landing body .topic-show-all:active, html.flow-landing body .public-share-button:active,
html.flow-landing body .site-header .auth-open:active, html.flow-landing body .topic-card-action:active, html.flow-landing body .catalog-action:active,
html body .home-topic-tabs .topic-filters button:active, html body #reading-flow button:active, html body .clear-reading-home:active,
html body.ubb-page button:active, html body #public-topic-start:active, html body #public-topic-actions .public-share-button:active,
  html body #reading-flow .flow-next:active, html body #reading-flow .flow-secondary:active, html body #reading-flow .flow-nav a:active, html body .bottom-navigation a:active {
  transform: scale(.96); filter: brightness(.88);
  transition: transform .1s ease-out, filter .1s ease-out;
}
@media (prefers-reduced-motion: no-preference) {
  /* Holding the press sinks a little deeper. */
  html.flow-landing body .button-dark:active, html.flow-landing body .topic-show-all:active, html.flow-landing body .public-share-button:active,
  html.flow-landing body .site-header .auth-open:active, html.flow-landing body .topic-card-action:active, html.flow-landing body .catalog-action:active,
  html body .home-topic-tabs .topic-filters button:active, html body #reading-flow button:active, html body .clear-reading-home:active,
  html body.ubb-page button:active, html body #public-topic-start:active, html body #public-topic-actions .public-share-button:active,
  html body #reading-flow .flow-next:active, html body #reading-flow .flow-secondary:active, html body #reading-flow .flow-nav a:active, html body .bottom-navigation a:active {
    animation: ubb-hold .5s .16s ease-out forwards;
  }
  @keyframes ubb-hold { to { transform: scale(.93); filter: brightness(.8); } }
}
@media (prefers-reduced-motion: reduce) {
  html.flow-landing body .button-dark, html.flow-landing body .topic-show-all, html.flow-landing body .public-share-button,
  html.flow-landing body .topic-card-action, html body .home-topic-tabs .topic-filters button, html body #reading-flow button,
  html body.ubb-page button, html body .bottom-navigation a { transition: filter .1s ease !important; }
  html.flow-landing body .button-dark:active, html.flow-landing body .topic-show-all:active, html.flow-landing body .public-share-button:active,
  html.flow-landing body .topic-card-action:active, html body .home-topic-tabs .topic-filters button:active, html body #reading-flow button:active,
  html body.ubb-page button:active, html body #public-topic-start:active, html body #public-topic-actions .public-share-button:active,
  html body #reading-flow .flow-next:active, html body #reading-flow .flow-secondary:active, html body #reading-flow .flow-nav a:active, html body .bottom-navigation a:active { transform: none; }
}
html body.ubb-page button:disabled { filter: grayscale(.5) brightness(.7); }
/* Account page (2026-10-14): one gold action that reads 로그인 · 가입, then 계정 · 동의 · 수신 설정. */
html body .account-page .account-primary {
  background: var(--ubb-gold) !important; color: var(--ubb-on-gold) !important; border: 0 !important;
  border-radius: var(--ubb-radius) !important; font-weight: 700 !important; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: transform .42s cubic-bezier(.34, 1.56, .64, 1), filter .25s ease;
}
html body .account-page .account-primary:active { transform: scale(.96); filter: brightness(.88); transition: transform .1s ease-out, filter .1s ease-out; }
@media (prefers-reduced-motion: reduce) { html body .account-page .account-primary:active { transform: none; } }
