* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, "Microsoft YaHei", sans-serif; }
button, input, textarea, select { font: inherit; }
button, select, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-underline-offset: .25em; }
[hidden] { display: none !important; }
.tarot-app { min-height: 100vh; padding: 0 max(18px, calc((100vw - 1200px) / 2)); line-height: 1.7; overflow-wrap: anywhere; }
.tarot-header { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid; }
.tarot-brand { font-size: 22px; text-decoration: none; letter-spacing: .14em; font-family: Georgia, "SimSun", serif; white-space: nowrap; }
.tarot-brand span { font-size: 14px; letter-spacing: .1em; }
nav { display: flex; flex-wrap: wrap; gap: 4px; }
.tarot-button { min-height: 44px; padding: 9px 18px; border: 1px solid; border-radius: 8px; line-height: 1.45; }
.tarot-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 22px 0; }
.tarot-hero { display: grid; grid-template-columns: 1.3fr .7fr; gap: 70px; align-items: center; padding: 72px 0; }
.tarot-eyebrow { font-size: 12px; letter-spacing: .23em; text-transform: uppercase; margin-bottom: 18px; }
h1 { font-family: Georgia, "SimSun", serif; font-weight: 500; font-size: clamp(32px, 4vw, 52px); line-height: 1.4; letter-spacing: .05em; margin: 0 0 20px; }
h2 { font-family: Georgia, "SimSun", serif; font-weight: 500; font-size: 26px; line-height: 1.5; }
h3 { font-size: 20px; }
.tarot-intro { max-width: 34em; font-size: 17px; }
.tarot-hero-art { position: relative; display: flex; justify-content: center; padding: 20px; }
.tarot-hero-art img { width: min(100%, 245px); height: auto; transform: rotate(7deg); box-shadow: 0 24px 55px #0003; border-radius: 15px; }
.tarot-panel { padding: clamp(20px, 3vw, 38px); border: 1px solid; margin: 24px 0; }
.tarot-mode-grid, .tarot-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tarot-mode-grid button { min-height: 80px; text-align: left; padding: 20px; }
.tarot-field { width: 100%; min-height: 46px; padding: 12px; border: 1px solid; border-radius: 8px; }
textarea.tarot-field { resize: vertical; min-height: 112px; }
label { display: block; margin: 12px 0 8px; }
.tarot-check { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.tarot-check input { width: 18px; height: 18px; flex: none; }
.tarot-help { font-size: 14px; }
.tarot-banner { border: 1px dashed; padding: 12px 18px; font-size: 14px; }
.tarot-status:empty { display: none; }
.tarot-status { padding: 12px 0; white-space: pre-wrap; }
.tarot-stepper { display: flex; gap: 20px; flex-wrap: wrap; padding: 24px 0 0; font-size: 14px; list-style: none; }
.tarot-stepper [aria-current="step"] { font-weight: 700; text-decoration: underline; text-underline-offset: 7px; }
.tarot-draw-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; max-width: 720px; margin: 28px auto; }
.tarot-draw-grid button { border: 2px solid transparent; padding: 0; background: transparent; border-radius: 10px; overflow: hidden; aspect-ratio: 3/5; }
.tarot-draw-grid img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tarot-draw-grid button[aria-pressed="true"] { transform: translateY(-8px); opacity: .35; border-color: currentColor; }
.tarot-spread { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tarot-spread[data-count="1"] { grid-template-columns: minmax(0, 620px); justify-content: center; }
.tarot-card { min-width: 0; }
.tarot-card-art { display: block; width: min(100%, 220px); margin: 24px auto; background: transparent; border: 0; padding: 0; }
.tarot-card-art img { display: block; width: 100%; height: auto; aspect-ratio: 3/5; object-fit: contain; border-radius: 12px; }
.tarot-card-face[data-reversed="true"] { transform: rotate(180deg); }
.tarot-card-art[data-flip="true"] { animation: tarot-reveal .35s ease-out; }
@keyframes tarot-reveal { from { opacity: .1; transform: rotateY(80deg); } to { opacity: 1; transform: rotateY(0deg); } }
.tarot-reading h3, .tarot-reading h4 { margin-bottom: 8px; }
.tarot-reading p { margin-top: 8px; }
.tarot-keywords { font-size: 13px; letter-spacing: .06em; }
.tarot-reading blockquote { margin: 20px 0; padding: 0 0 0 16px; border-left: 2px solid; }
.tarot-gallery { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 24px 18px; }
.tarot-gallery button { padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.tarot-gallery img { width: 100%; height: auto; aspect-ratio: 3/5; border-radius: 9px; object-fit: contain; }
.tarot-gallery span { display: block; padding-top: 8px; }
.tarot-history-item { display: flex; gap: 16px; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid; }
.tarot-history-item button { flex: none; }
.tarot-dialog { width: min(640px, calc(100vw - 24px)); max-height: 90vh; padding: 28px; border: 1px solid; border-radius: 16px; }
.tarot-dialog::backdrop { background: #061221b3; }
.tarot-dialog img { display: block; width: min(100%, 300px); height: auto; margin: 16px auto; }
.tarot-dialog form[method="dialog"] { margin-top: 24px; }
.tarot-ai-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.tarot-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 32px 0; margin-top: 48px; border-top: 1px solid; font-size: 13px; }
.tarot-skip { position: absolute; left: -9999px; }
.tarot-skip:focus { position: fixed; left: 12px; top: 12px; padding: 12px; background: white; color: black; z-index: 20; }
:focus-visible { outline: 3px solid #3673c3; outline-offset: 4px; }
@media (max-width: 700px) {
 .tarot-header { align-items: flex-start; flex-direction: column; padding: 22px 0 12px; gap: 14px; }
 nav { width: 100%; justify-content: space-between; gap: 0; }
 nav .tarot-button { padding: 8px 10px; }
 .tarot-hero { grid-template-columns: 1fr; padding: 36px 0; gap: 28px; }
 .tarot-hero-art { display: none; }
 .tarot-mode-grid, .tarot-fields, .tarot-spread { grid-template-columns: 1fr; }
 .tarot-draw-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
 .tarot-gallery { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px 12px; }
 .tarot-footer, .tarot-history-item { align-items: flex-start; flex-direction: column; gap: 8px; }
 .tarot-stepper { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
