:root { color-scheme: light; font-family: system-ui, "Malgun Gothic", sans-serif; color: #29261f; background: #faf8f3; }
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; }
.page { width: min(100% - 32px, 780px); margin: 0 auto; padding: 28px 0 56px; }
.back-link { display: inline-block; margin-bottom: 20px; color: #34554c; }
header, .panel, .privacy-note, .result { padding: clamp(18px, 4vw, 28px); border: 1px solid #b8aa91; border-radius: 18px; background: #fffefa; }
header { border-color: #517b67; }
.eyebrow { margin: 0 0 6px; color: #52705c; font-size: .84rem; font-weight: 700; letter-spacing: .08em; }
h1, h2, p { overflow-wrap: anywhere; }
h1 { margin: 0 0 8px; font-size: clamp(1.7rem, 7vw, 2.35rem); line-height: 1.2; }
h2 { margin: 0 0 8px; font-size: 1.35rem; line-height: 1.3; }
.privacy-note, .panel, .result { margin-top: 16px; }
.privacy-note { border-color: #716286; background: #f5f1f8; }
.privacy-note p:last-child { margin-bottom: 0; }
.panel { display: grid; gap: 12px; border-color: #557283; }
label { display: grid; gap: 6px; font-weight: 650; }
select, input, button { width: 100%; min-height: 46px; padding: 9px 12px; border: 1px solid #6e6558; border-radius: 10px; background: #fff; color: inherit; font: inherit; }
fieldset { min-width: 0; margin: 0; padding: 14px; border: 1px solid #8b7b64; border-radius: 12px; }
legend { padding: 0 6px; font-weight: 700; }
.paired-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tarot-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.tarot-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.tarot-card { display: grid; align-content: center; justify-items: center; aspect-ratio: .72; min-height: 76px; padding: 6px; border: 1px solid #77634a; border-radius: 10px; background: repeating-linear-gradient(135deg, #35594d 0 6px, #436b5d 6px 12px); color: white; font-size: .82rem; text-align: center; cursor: pointer; }
.tarot-card[aria-pressed="true"] { border: 3px solid #b16d4b; background: #fff7e8; color: #29261f; font-weight: 750; }
.tarot-card:focus-visible { outline: 3px solid #c16c44; outline-offset: 2px; }
button { border-color: #315a50; background: #315a50; color: white; font-weight: 750; cursor: pointer; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #c16c44; outline-offset: 2px; }
.status { min-height: 1.5em; margin: 0; color: #8b3025; }
.result { border: 2px solid #b16d4b; }
.result p:last-child { margin-bottom: 0; }
.disclaimer, .source-note { color: #5f574c; font-size: .92rem; }
.source-note { margin-top: 18px; text-align: center; }
[hidden] { display: none !important; }
@media (max-width: 420px) { .page { width: min(100% - 20px, 780px); padding-top: 12px; } .paired-fields, .tarot-actions { grid-template-columns: 1fr; } .tarot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .tarot-card { min-height: 82px; } }

.method-note{font-size:11px;line-height:1.65;color:#797f76}

/* Selected-card details precede the long deck, close to the draw action. */
.tarot-detail { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); gap: 20px; align-items: start; }
.tarot-illustration { margin: 0; text-align: center; }
.tarot-illustration img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 6px 18px #203c5426; }
.tarot-illustration img.is-reversed { transform: rotate(180deg); }
.tarot-illustration figcaption { margin-top: 12px; font-size: .9rem; font-weight: 700; }
.tarot-reading-sections h3 { font-size: 1rem; margin: 18px 0 5px; color: #315a50; }
.tarot-reading-sections p { margin: 0; }
.tarot-meaning { color: #74472e; font-weight: 750; }
.tarot-art-credit { grid-column: 1 / -1; color: #5f574c; font-size: .82rem; margin: 0; }
#extra-result-copy { white-space: pre-line; }
#extra-result { scroll-margin-top: 16px; }
@media (max-width: 560px) {
  .tarot-detail { grid-template-columns: 1fr; gap: 16px; }
  .tarot-illustration { width: min(240px, 100%); margin: 0 auto; }
}
@media (max-width: 420px) {
  .panel { padding: 12px; }
  .panel fieldset { padding: 9px; }
  .panel .result { padding: 12px; border-radius: 12px; }
}

/* Full original card scans are contained, never cropped. Only the chosen card loads. */
.tarot-image-frame { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 3 / 5; padding: 7px; border: 1px solid #b8a787; border-radius: 10px; background: #eee5d2; box-shadow: 0 7px 22px #392c2424; }
.tarot-illustration .tarot-image-frame img { width: 100%; height: 100%; max-height: 100%; object-fit: contain; border-radius: 3px; box-shadow: none; }
#tarot-image-status { position: absolute; inset: 12px; display: grid; place-items: center; margin: 0; color: #514537; font-size: .9rem; }
.tarot-art-credit p { margin: 0 0 4px; }
.tarot-art-credit a { color: #315a50; text-underline-offset: 3px; }
