* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #EDEBEF; }
body { font-family: 'Inter', 'Noto Sans SC', system-ui, sans-serif; color: #10161C; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid #10161C; outline-offset: 2px; }
a { color: #1E2A36; }

#app { position: relative; max-width: 480px; height: 100dvh; margin: 0 auto; overflow: hidden; }
/* On phones, pin the app to the visible screen so the bottom bar is never pushed below it (Android edge-to-edge, refresh). */
@media (max-width: 519px) { html, body { overflow: hidden; } #app { position: fixed; top: 0; right: 0; bottom: 0; left: 0; height: auto; max-width: none; } }
@media (min-width: 520px) { #app { height: min(100dvh, 900px); margin-top: max(0px, calc((100dvh - 900px) / 2)); border-radius: 36px; box-shadow: 0 30px 80px rgba(30, 30, 60, 0.18); } }
.grain { position: absolute; inset: 0; mix-blend-mode: overlay; pointer-events: none; background-size: cover; }

.top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; height: 64px; padding: 14px 20px 0; padding-top: calc(14px + env(safe-area-inset-top)); display: flex; justify-content: space-between; align-items: center; }
.brand { font-size: 11px; font-weight: 600; letter-spacing: 0.2em; color: #FFFFFF; }
.lang { min-width: 44px; height: 44px; margin-right: -8px; padding: 0 8px; border: none; background: transparent; color: #FFFFFF; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; cursor: pointer; }

.scr { position: absolute; inset: 0; overflow-y: auto; display: flex; flex-direction: column; scrollbar-width: none; }
.scr::-webkit-scrollbar { display: none; }
.scr.sub { padding: calc(72px + env(safe-area-inset-top)) 20px 32px; gap: 16px; }

.back { align-self: flex-start; height: 44px; padding: 0 8px 0 0; margin-left: -4px; border: none; background: transparent; color: #FFFFFF; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 2px; cursor: pointer; }
.panel { background: rgba(255, 255, 255, 0.94); border-radius: 30px; padding: 26px 24px; display: flex; flex-direction: column; gap: 22px; box-shadow: 0 20px 50px rgba(30, 50, 70, 0.18); }
.h1 { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.2; }
.muted { margin: 0; font-size: 14px; line-height: 1.5; color: #4A5560; }
.sec { display: flex; flex-direction: column; gap: 10px; }
.sec h2 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #3A4652; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 18px; background: #E7EEF5; color: #10161C; }
.chip.out { padding: 7px 13px; background: transparent; border: 1px solid #C5CED7; color: #3A4652; }
.chip.gold { font-weight: 600; background: #F6EEE2; color: #6B4A1E; }
.dot { width: 8px; height: 8px; border-radius: 4px; background: #C18D4A; margin-top: 8px; flex: none; }
.dot.out { background: transparent; border: 1.5px solid #8A939C; width: 8px; height: 8px; box-sizing: border-box; }
.btn { height: 54px; border-radius: 27px; border: none; background: #10161C; color: #FFFFFF; font-size: 16px; font-weight: 600; cursor: pointer; }
.btn[disabled] { opacity: 0.45; cursor: default; }
.link { align-self: center; min-height: 44px; padding: 0 16px; border: none; background: transparent; color: #3A4652; font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* Entry */
.entry { padding: calc(96px + env(safe-area-inset-top)) 22px 32px; gap: 22px; }
.entry h1 { margin: 0; font-size: 36px; font-weight: 600; line-height: 1.1; color: #FFFFFF; letter-spacing: -0.01em; }
.entry .lead { margin: 0; font-size: 16px; line-height: 1.5; color: #F2F6FA; }
.form { background: rgba(255, 255, 255, 0.82); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-radius: 28px; padding: 24px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 20px 50px rgba(30, 50, 70, 0.18); }
.form label { font-size: 13px; font-weight: 600; color: #3A4652; }
.field { height: 50px; border-radius: 14px; border: 1px solid #C5CED7; background: #FFFFFF; padding: 0 14px; font-size: 16px; color: #10161C; font-family: inherit; width: 100%; }
.preview { font-size: 13px; font-weight: 600; color: #6B4A1E; min-height: 18px; }
.note { background: rgba(255, 255, 255, 0.55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-radius: 22px; padding: 18px 20px; margin: 0; font-size: 14px; line-height: 1.5; color: #1E2A36; }

/* Today */
.today { padding: calc(80px + env(safe-area-inset-top)) 20px 112px; gap: 18px; }
.hero { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 8px; }
.hero .t1 { font-size: 30px; font-weight: 600; color: #FFFFFF; line-height: 1.15; }
.hero .t2 { font-size: 26px; font-weight: 400; color: #F4F7FA; line-height: 1.2; }
.pchip { align-self: flex-start; margin-top: 8px; min-height: 36px; font-size: 13px; font-weight: 600; color: #FFFFFF; padding: 6px 10px 6px 12px; border-radius: 18px; background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.45); display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.hello { font-size: 15px; color: #FFFFFF; margin-top: 8px; }
.dmb { width: 64px; height: 64px; flex: none; border-radius: 32px; border: 1px solid rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.2); color: #FFFFFF; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.dmb small { font-size: 10px; letter-spacing: 0.06em; }
.dmb b { font-size: 22px; font-weight: 700; font-family: 'Noto Sans SC', sans-serif; line-height: 1.1; }
.qwrap { background: rgba(255, 255, 255, 0.4); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-radius: 30px; padding: 14px 8px 8px; display: flex; flex-direction: column; gap: 10px; }
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px 0 16px; border: none; background: transparent; color: #10161C; font-size: 13px; font-weight: 700; cursor: pointer; text-align: left; }
.qlink { display: inline-flex; align-items: center; gap: 2px; flex: none; font-size: 12px; font-weight: 600; color: #10161C; padding: 4px 6px 4px 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.7); }
.qcard { background: rgba(255, 255, 255, 0.92); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 14px 34px rgba(30, 50, 70, 0.14); min-height: 220px; }
.qlbl { font-size: 13px; color: #4A5560; }
.quote { margin: 0; font-family: 'Source Serif 4', 'Noto Serif SC', serif; font-weight: 600; font-size: 25px; line-height: 1.38; flex-grow: 1; text-wrap: pretty; }
.week { background: rgba(255, 255, 255, 0.78); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-radius: 26px; padding: 18px 14px; display: flex; flex-direction: column; gap: 12px; }
.whead { display: flex; justify-content: space-between; padding: 0 8px; font-size: 13px; color: #3A4652; }
.whead b { color: #10161C; font-weight: 600; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.day { height: 72px; border-radius: 22px; border: none; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; padding: 0; color: #1E2A36; }
.day span { font-size: 12px; }
.day b { font-size: 18px; font-weight: 500; }
.day.sel { background: #FFFFFF; box-shadow: 0 6px 16px rgba(30, 50, 70, 0.14); }
.day.sel span { color: #4A5560; }
.day.sel b { font-weight: 700; color: #10161C; }
.hint { margin: 0; font-size: 12px; color: #4A5560; text-align: center; }
.dock { position: absolute; left: 0; right: 0; bottom: 0; height: 104px; background: linear-gradient(180deg, rgba(246, 247, 249, 0) 0%, rgba(246, 247, 249, 0.92) 55%); display: flex; align-items: flex-end; justify-content: center; padding-bottom: calc(26px + env(safe-area-inset-bottom)); pointer-events: none; }
.goalspill { pointer-events: auto; height: 50px; padding: 0 22px; border-radius: 25px; border: 1px solid #FFFFFF; background: rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 10px 28px rgba(30, 50, 70, 0.16), inset 0 0 0 1px rgba(193, 141, 74, 0.25); color: #10161C; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.goalspill.has { padding-right: 10px; }
.badge { min-width: 30px; height: 30px; border-radius: 15px; background: #C18D4A; color: #FFFFFF; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 8px; }

/* Tong Shu sheet */
.sheet { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; justify-content: flex-end; }
.scrim { position: absolute; inset: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; background: rgba(16, 22, 28, 0.5); cursor: pointer; }
.sbody { position: relative; max-height: 94%; overflow-y: auto; background: #FFFFFF; border-radius: 28px 28px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.22); }
.shead { color: #FFFFFF; padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.shead h2 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; }
.x { width: 44px; height: 44px; border-radius: 22px; border: 1px solid rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.15); color: #FFFFFF; padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.big { display: flex; align-items: center; gap: 24px; padding: 4px 6px 0; }
.big .p { display: flex; flex-direction: column; font-family: 'Noto Serif SC', serif; font-size: 66px; font-weight: 700; line-height: 1.08; }
.big .rule { width: 1px; align-self: stretch; background: rgba(255, 255, 255, 0.35); }
.big .d { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.big .d small { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; }
.big .d b { font-size: 76px; font-weight: 300; line-height: 1; }
.big .d span { font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; }
.sbot { padding: 20px 22px calc(30px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; }
.pill3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #E3E8ED; border-radius: 18px; }
.pill3 div { padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; border-right: 1px solid #E3E8ED; }
.pill3 div:last-child { border-right: none; background: #F6EEE2; border-radius: 0 17px 17px 0; }
.pill3 b { font-family: 'Noto Serif SC', serif; font-size: 20px; font-weight: 700; }
.pill3 span { font-size: 12px; color: #4A5560; }
.pill3 div:last-child span { color: #8A6230; font-weight: 600; }
.perk { font-size: 11px; font-weight: 600; color: #FFFFFF; background: #C18D4A; padding: 3px 9px; border-radius: 10px; }
.lockwrap { position: relative; }
.lockwrap.locked .lockc { filter: blur(6px); user-select: none; }
.lockc { display: flex; flex-direction: column; gap: 16px; }
.lockc h3 { margin: 0; font-size: 13px; font-weight: 700; color: #3A4652; }
.lockbox { position: absolute; inset: -6px; display: flex; align-items: center; justify-content: center; }
.lockbox > div { width: 100%; max-width: 300px; background: rgba(255, 255, 255, 0.96); border: 1px solid #E0CFB4; border-radius: 22px; box-shadow: 0 12px 30px rgba(30, 50, 70, 0.16); padding: 18px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.lockicon { width: 40px; height: 40px; border-radius: 20px; background: #F6EEE2; color: #8A6230; display: flex; align-items: center; justify-content: center; }

/* Card */
.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 26px; background: #EAEEF2; }
.tab { height: 48px; border-radius: 22px; border: none; background: transparent; color: #4A5560; font-family: 'Noto Sans SC', sans-serif; font-size: 17px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; padding: 0; }
.tab.sel { background: #FFFFFF; box-shadow: 0 4px 12px rgba(30, 50, 70, 0.12); color: #10161C; font-weight: 700; }
.now { font-size: 11px; font-weight: 600; color: #8A6230; border: 1px solid #C18D4A; padding: 1px 7px; border-radius: 10px; }
.tab.sel .now { color: #FFFFFF; background: #C18D4A; padding: 2px 8px; border: none; }
.gname { font-size: 56px; font-weight: 700; line-height: 1.1; font-family: 'Noto Sans SC', sans-serif; }
.row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid #E3E8ED; font-size: 15px; line-height: 1.5; }

/* Goals */
.glist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.glist li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid #E3E8ED; }
.ib { width: 44px; height: 44px; flex: none; border: none; background: transparent; color: #5A646E; padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ring { width: 22px; height: 22px; border-radius: 11px; border: 1.5px solid #8A949E; }
.tick { width: 24px; height: 24px; border-radius: 12px; background: #C18D4A; color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.gtext { flex: 1; font-size: 16px; line-height: 1.4; }
.gtext.done { color: #5A646E; text-decoration: line-through; }
.addrow { display: flex; gap: 8px; align-items: center; }
.addrow input { flex: 1; min-width: 0; height: 50px; border-radius: 25px; border: 1px solid #C5CED7; background: #FFFFFF; padding: 0 18px; font-size: 15px; font-family: inherit; }
.addrow button { height: 50px; padding: 0 20px; border-radius: 25px; border: none; background: #10161C; color: #FFFFFF; font-size: 15px; font-weight: 600; cursor: pointer; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* DM */
.dmhead { display: flex; align-items: center; gap: 16px; }
.dmcircle { width: 72px; height: 72px; flex: none; border-radius: 36px; background: #F3EEE6; border: 1px solid #E0CFB4; font-family: 'Noto Serif SC', serif; font-size: 36px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.dmdesc { margin: 0; font-family: 'Source Serif 4', 'Noto Serif SC', serif; font-weight: 600; font-size: 21px; line-height: 1.45; white-space: pre-line; }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 18px; background: #F6EEE2; font-size: 15px; line-height: 1.5; }

/* Unlock */
.price { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 18px; border-radius: 18px; background: #F6EEE2; font-size: 15px; font-weight: 600; }
.price b { font-size: 22px; }
.ul li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid #E3E8ED; font-size: 15px; line-height: 1.5; }
.ul { margin: 0; padding: 0; list-style: none; }
.ok { width: 22px; height: 22px; flex: none; border-radius: 11px; background: #C18D4A; color: #FFFFFF; display: flex; align-items: center; justify-content: center; }

.center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 32px; text-align: center; color: #FFFFFF; font-size: 16px; line-height: 1.5; }
.alert { font-size: 14px; line-height: 1.5; padding: 10px 14px; border-radius: 14px; }
.alert.warn { background: #FBEDEA; color: #7A2E22; }
.alert.good { background: #F6EEE2; color: #6B4A1E; }
.almanac { display: flex; flex-direction: column; gap: 16px; border-top: 1px solid #E3E8ED; padding-top: 18px; }
.almh { font-size: 15px !important; color: #10161C !important; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.facts div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid #E3E8ED; border-radius: 14px; }
.facts span { font-size: 12px; color: #4A5560; }
.facts b { font-size: 15px; font-weight: 600; }
.colours { display: flex; flex-direction: column; gap: 6px; }
.crow { display: flex; gap: 12px; font-size: 15px; align-items: baseline; }
.crow span { flex: none; width: 40px; font-size: 13px; color: #4A5560; }
.crow b { font-weight: 500; }
.facts small { font-size: 12px; color: #4A5560; line-height: 1.4; }
.tabbar { position: absolute; left: 12px; right: 12px; bottom: max(12px, calc(8px + env(safe-area-inset-bottom))); z-index: 10; height: 64px; display: flex; border-radius: 22px; background: rgba(255, 255, 255, 0.92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid #FFFFFF; box-shadow: 0 10px 28px rgba(30, 30, 60, 0.14); }
.tab { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: #6B7580; font: inherit; font-size: 12px; font-weight: 500; text-decoration: none; cursor: pointer; border-radius: 18px; }
.tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab.on { color: #10161C; font-weight: 700; }
.tab.on svg { stroke-width: 2.1; }
.tab:focus-visible { outline: 2px solid #C18D4A; outline-offset: -4px; }
.tdot { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #C18D4A; color: #FFFFFF; font-size: 11px; font-style: normal; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.today, .tabscr { padding-bottom: 96px !important; }
.soon { font-size: 12px; font-weight: 700; color: #6B4A1E; background: #F6EEE2; padding: 4px 10px; border-radius: 10px; }
.menu { display: flex; flex-direction: column; border: 1px solid #E3E8ED; border-radius: 18px; overflow: hidden; }
.mrow { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px; border: 0; border-bottom: 1px solid #E3E8ED; background: #FFFFFF; font: inherit; font-size: 16px; color: #10161C; text-align: left; cursor: pointer; }
.mrow:last-child { border-bottom: 0; }
.mrow > span:first-child { flex: 1; }
.mrow svg { width: 16px; height: 16px; }
.a2hs { position: absolute; left: 12px; right: 12px; bottom: max(86px, calc(82px + env(safe-area-inset-bottom))); z-index: 11; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 20px; background: #10161C; color: #FFFFFF; box-shadow: 0 12px 30px rgba(16, 22, 28, 0.3); }
.a2hs img { border-radius: 10px; flex: none; }
.a2hs div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.a2hs b { font-size: 15px; }
.a2hs p { margin: 0; font-size: 13px; line-height: 1.45; color: #D5DBE0; }
.a2hs .shr { width: 16px; height: 16px; vertical-align: -3px; fill: none; stroke: #FFFFFF; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.a2btn { height: 36px; padding: 0 16px; border: 0; border-radius: 18px; background: #C18D4A; color: #FFFFFF; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.a2x { width: 32px; height: 32px; flex: none; border: 0; border-radius: 16px; background: rgba(255, 255, 255, 0.12); color: #FFFFFF; font-size: 20px; line-height: 1; cursor: pointer; }

.yq { width: 100%; box-sizing: border-box; border: 1px solid #E3E8ED; border-radius: 16px; padding: 12px 14px; font: inherit; font-size: 16px; resize: none; background: #FFFFFF; }
.cta { height: 52px; border: 0; border-radius: 26px; background: #10161C; color: #FFFFFF; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.yh { margin: 0; font-size: 15px; }
.mrow small { font-size: 12px; }
.yhex { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 18px 0 6px; }
.ycol { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ycol b { font-size: 26px; font-family: 'Noto Serif SC', serif; }
.ycol small { font-size: 12px; color: #4A5560; }
.hex { width: 76px; height: 84px; }
.yarr { font-size: 22px; color: #8A939C; }
.ysec { display: flex; flex-direction: column; gap: 4px; }
.ysec h3 { margin: 0; font-size: 13px; color: #4A5560; }
.ysec p { margin: 0; font-size: 16px; line-height: 1.6; }
.ysec.on { background: #F6EEE2; border-radius: 14px; padding: 12px 14px; }
.ysec.on h3 { color: #6B4A1E; }
.free { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; color: #4A5560; }
.coins { display: inline-flex; gap: 4px; }
.coin { width: 20px; height: 20px; fill: #E9C98F; stroke: #A9762F; stroke-width: 1.4; }
.coin rect { fill: #FFFFFF; }
.coin.used { fill: none; stroke: #C9D0D6; }
.coin.used rect { fill: none; }
.coins.big .coin { width: 34px; height: 34px; }
.pay { padding: 26px 22px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; }
.paytop { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.paytop h2 { margin: 4px 0 0; font-size: 20px; }
.paytop p { margin: 0; color: #4A5560; font-size: 15px; }
.plans { display: flex; flex-direction: column; gap: 10px; }
.plan { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid #E3E8ED; border-radius: 18px; background: #FFFFFF; font: inherit; text-align: left; cursor: pointer; }
.plan span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.plan b { font-size: 16px; }
.plan small { font-size: 13px; color: #4A5560; }
.plan em { font-style: normal; font-weight: 700; font-size: 15px; }
.plan.best { border: 2px solid #C18D4A; background: #FBF6EE; }
.plan i { position: absolute; top: -10px; right: 14px; font-style: normal; font-size: 11px; font-weight: 700; color: #FFFFFF; background: #C18D4A; padding: 2px 8px; border-radius: 8px; }
.ycard { width: 16px; height: 21px; fill: #E9C98F; stroke: #A9762F; stroke-width: 1.3; stroke-linecap: round; }
.ycard path { stroke: #A9762F; }
.ycard.used { fill: none; stroke: #C9D0D6; }
.ycard.used path { stroke: #C9D0D6; }
.coins.big .ycard { width: 28px; height: 37px; }
.wa { margin: 0; text-align: center; font-size: 13px; color: #4A5560; }
.plan { text-decoration: none; color: #10161C; }
.yqtext { margin: -10px 0 0; font-size: 18px; font-weight: 600; line-height: 1.45; }
.yerr { margin: 0; font-size: 14px; color: #A3321F; background: #FBEDEA; border-radius: 12px; padding: 10px 12px; }
.yread { display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.7; border-top: 1px solid #E3E8ED; padding-top: 16px; }
.yread h3 { margin: 8px 0 0; font-size: 15px; color: #8A5A1E; }
.yread p { margin: 0; }
.yread ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.btn2 { height: 48px; border-radius: 24px; border: 1px solid #C5CED7; background: #FFFFFF; color: #10161C; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.fl { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: #4A5560; }
.cta[disabled] { opacity: 0.5; cursor: default; }
/* Card draw styles ported from 心中有卦 */
.yjx{
  --ground:#E4E6E1; --ground-2:#D8DBD4; --fg:#1D1E1B; --muted:#62645E; --rule:#C6C9C1;
  --cinnabar:#C18D4A; --cinnabar-soft:#F4EADB; --cinnabar-deep:#8A5F27; --on-accent:#1D1A14; --back:#9A2A22; --back-edge:#6E1C16;
  --card-paper:#FCFCF9; --card-ink:#1A1916; --card-rule:#2A2925; --card-muted:#6E6D67;
  --f-han:"Noto Sans SC","PingFang SC","Microsoft YaHei","Hiragino Sans GB",sans-serif;
  --f-latin:"Noto Sans SC","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  --f-ui:system-ui,-apple-system,"Segoe UI",sans-serif;
  --shadow:0 1px 2px rgba(0,0,0,.12),0 6px 18px rgba(0,0,0,.10);
--btn:#9C6E33;--btn-ink:#FFFFFF}
.yjx .deckhead .qq{font-style:normal;color:var(--muted);min-width:0}
@keyframes deal{from{opacity:0;transform:translateY(-14px) rotate(-6deg)}to{opacity:1;transform:none}}
.yjx .flip{perspective:1400px}
.yjx .flip-inner{position:relative;transform-style:preserve-3d;animation:flip .9s cubic-bezier(.3,.7,.2,1) both}
@keyframes flip{from{transform:rotateY(180deg)}to{transform:rotateY(0)}}
.yjx .face{background:var(--card-paper);color:var(--card-ink);border-radius:12px;box-shadow:var(--shadow);padding:18px 16px 14px;backface-visibility:hidden;font-family:var(--f-han)}
.yjx .fhead{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:6px}
.yjx .vert{writing-mode:vertical-rl;font-size:12px;color:var(--card-muted);letter-spacing:.15em}
.yjx .vert.full{font-size:14px;color:var(--card-ink)}
.yjx .hexname{font-size:40px;font-weight:900;line-height:1}
.yjx .badge{writing-mode:vertical-rl;background:var(--card-ink);color:var(--card-paper);border-radius:999px;padding:8px 3px;font-size:11px;letter-spacing:.05em}
.yjx .en{text-align:center;font-family:var(--f-latin);font-style:normal;color:var(--card-muted);font-size:14px;margin:2px 0 10px}
.yjx .tblwrap{overflow-x:auto;border:1.5px solid var(--card-rule);border-radius:4px}
.yjx .tbl{display:flex;flex-direction:row-reverse;width:max-content;min-width:100%}
.yjx .col{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;border-left:1px solid var(--card-rule)}
.yjx .col .lab{align-self:stretch}
.yjx .col:last-child{border-left:none}
.yjx .col .lab{background:var(--card-ink);color:var(--card-paper);font-size:11px;text-align:center;padding:2px 4px;white-space:nowrap}
.yjx .col .txt{writing-mode:vertical-rl;height:15.5em;padding:8px 6px;font-size:14px;line-height:1.7;letter-spacing:.06em}
.yjx .col.judg .txt{font-weight:600;font-size:15px}
.yjx .col.hit{background:var(--cinnabar-soft)}
.yjx .col.hit .lab{background:#C18D4A;color:var(--on-accent)}
.yjx .col.hit .txt{color:#8A5F27;font-weight:600}
.yjx .fmeta{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:10px;font-size:13px;color:var(--card-muted)}
.yjx .zhi{display:flex;align-items:center;gap:8px}
.yjx .reading .asked{font-family:var(--f-ui);font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin:0 0 4px}
.yjx .reading .qtext{font-size:20px;margin:0 0 18px;font-style:normal;text-wrap:balance}
@keyframes pulse{50%{opacity:.25}}
@media (prefers-reduced-motion:reduce){.yjx .back,.yjx .flip-inner,.yjx .dot{animation:none!important}}
.yjx .oracle{display:flex;flex-direction:column;align-items:center;gap:18px;padding-block:8px 24px;text-align:center}
.yjx .oracle .qq{font-style:normal;color:var(--muted);margin:0;max-width:40ch;text-wrap:balance}
.yjx .ocard{all:unset;cursor:pointer;box-sizing:border-box;width:min(270px,70vw);aspect-ratio:5/7;max-width:100%;position:relative;
  background:var(--card-paper);color:var(--card-ink);border-radius:14px;box-shadow:var(--shadow);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;
  outline:1.5px solid var(--card-rule);outline-offset:-10px;animation:breathe 1.8s ease-in-out infinite}
.yjx .ocard:focus-visible{box-shadow:0 0 0 3px var(--cinnabar),var(--shadow)}
.yjx .ocard.settling{animation:none;box-shadow:0 0 0 1px rgba(193,141,74,.25),0 10px 34px rgba(193,141,74,.22)}
@keyframes breathe{0%,100%{box-shadow:var(--shadow)}50%{box-shadow:0 0 0 1px rgba(193,141,74,.18),0 8px 30px rgba(193,141,74,.25)}}
.yjx .onum{position:absolute;top:20px;right:20px;writing-mode:vertical-rl;background:var(--card-ink);color:var(--card-paper);border-radius:999px;padding:8px 3px;font-family:var(--f-han);font-size:11px;letter-spacing:.05em}
.yjx .obars{display:flex;flex-direction:column;gap:11px;width:56%}
.yjx .bar{display:flex;height:13px}
.yjx .bar i{flex:1;background:#9a978f}
.yjx .ocard:not(.settling) .obars,.yjx .ocard:not(.settling) .oname{filter:blur(.7px)}
.yjx .ocard.settling{animation:stopjolt .35s ease-out!important}
@keyframes stopjolt{0%{transform:scale(1.04)}100%{transform:none}}
.yjx .bar b{width:16%;background:#9a978f}
.yjx .bar.yin b{opacity:0}
.yjx .bar.locked i,.yjx .bar.locked b{background:var(--card-ink)}
.yjx .bar.locked{animation:lock .35s ease-out}
@keyframes lock{0%{transform:scaleX(1.12)}100%{transform:none}}
.yjx .bar.hot i,.yjx .bar.hot b{background:#C18D4A;box-shadow:0 0 12px rgba(193,141,74,.55)}
.yjx .oname{font-family:var(--f-han);font-weight:900;font-size:38px;line-height:1;min-height:1em;color:var(--card-muted);transition:color .2s}
.yjx .ocard.named .oname{color:var(--card-ink);animation:lock .4s ease-out}
.yjx .ohints{display:flex;flex-direction:column;gap:6px}
.yjx .ohint{margin:0;font-family:var(--f-han);font-size:17px;color:var(--fg);letter-spacing:.06em}
.yjx .ohint2{margin:0;font-family:var(--f-han);font-size:13px;color:var(--muted)}
.yjx .motto{margin:-4px 0 0;font-family:var(--f-han);font-size:13px;letter-spacing:.2em;color:var(--muted)}
.yjx .ding{all:unset;cursor:pointer;display:grid;place-items:center;width:68px;height:68px;border-radius:50%;background:var(--cinnabar);color:var(--on-accent);font-family:var(--f-han);font-weight:900;font-size:28px;box-shadow:0 4px 14px rgba(193,141,74,.35);transition:transform .12s}
.yjx .ding:active{transform:scale(.94)}
.yjx .ding:focus-visible{outline:2px solid var(--fg);outline-offset:3px}
.yjx .ding[disabled]{opacity:.35;cursor:default}
@media (prefers-reduced-motion:reduce){.yjx .ocard,.yjx .bar.locked,.yjx .ocard.named .oname{animation:none!important}}
@media print{.yjx .p-card .face{box-shadow:none;border:1px solid #CFCBC2}.yjx .p-card .col .txt{height:13em}.yjx .flip-inner{animation:none!important}}
.yjx .rel{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px 16px}
.yjx .btn:not(.ghost),.yjx .ding{background:var(--btn);color:var(--btn-ink)}
.yjx .cardcol .face{box-shadow:none!important;background:transparent}
.yjx .qq{color:#fff!important;font-size:17px;text-shadow:0 1px 10px rgba(160,60,60,.18)}
.yjx .ohint{color:var(--fg)!important}
.yjx .ohint2,.yjx .motto{color:var(--muted)!important}
.yjx .ocard{border-radius:24px!important;box-shadow:0 20px 50px rgba(120,40,80,.22)!important}
.yjx .ding{background:#fff!important;color:var(--fg)!important;border:1.5px solid #F1E3C8!important;box-shadow:0 8px 24px rgba(120,40,80,.16)!important}
.yjx .face{border-radius:26px;padding:20px 16px 16px}
.yjx .reading{background:rgba(255,255,255,.9);border-radius:30px;padding:24px 22px;box-shadow:var(--shadow)}
.yjx .qq{color:var(--fg)!important;text-shadow:none}
.yjx .ohint{color:var(--fg)!important}
.yjx .ohint2,.yjx .motto{color:var(--muted)!important}
.yjx .ding{border:1.5px solid var(--cinnabar)!important;box-shadow:0 6px 18px rgba(29,30,27,.10)!important}
.yjx .ocard{box-shadow:0 16px 40px rgba(29,30,27,.14)!important}
.yjx .reading{background:#fff}.yjx .badge { display: inline-block; min-width: 0; height: auto; padding: 8px 3px; font-weight: 600; }
.yacts { display: flex; gap: 10px; }
.yacts .btn2 { flex: 1; }
.btn2.gold { background: #C18D4A; border-color: #C18D4A; color: #FFFFFF; }
#printArea { display: none; }
@page { size: A4; margin: 14mm 14mm 16mm; }
@media print {
  html, body { background: #FFFFFF !important; }
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block !important; color: #1D1E1B; font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .p-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid #CFCBC2; margin-bottom: 14px; }
  .p-date { font-size: 11px; color: #5E5F59; }
  .p-lab { font-size: 11px; color: #5E5F59; letter-spacing: 0.1em; }
  .p-qt { font-size: 16px; margin: 2px 0 14px; }
  .p-card { break-inside: avoid; page-break-inside: avoid; }
  .p-card .yjx .face { box-shadow: none; border: 1px solid #CFCBC2; }
  .p-card .yjx .flip-inner { animation: none; }
  .p-card .yjx .tblwrap { overflow: visible; }
  .p-card .yjx .tbl { width: 100%; }
  .p-card .yjx .col .txt { height: 13em; }
  .p-out { font-size: 13.5px; line-height: 1.85; margin-top: 10px; }
  .p-out h3 { break-after: avoid; page-break-after: avoid; margin: 16px 0 4px; font-size: 14px; color: #8A5A1E; }
  .p-out p, .p-out li { orphans: 3; widows: 3; margin: 0 0 6px; }
  .p-foot { margin-top: 18px; padding-top: 8px; border-top: 1px solid #CFCBC2; font-size: 10.5px; color: #5E5F59; }
}
.pchip.back2 { background: #FFFFFF; color: #10161C; border-color: #FFFFFF; padding: 6px 12px; }
.pchip.back2 { background: rgba(255, 255, 255, 0.18); color: #FFFFFF; border-color: rgba(255, 255, 255, 0.6); }
.pchip.ts { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 6px; }
.pchip.ts b { font-weight: 700; white-space: nowrap; }
.pchip.ts .tsd { font-weight: 500; opacity: 0.85; white-space: nowrap; }
.pchip.ts .tsd::before { content: '·'; margin-right: 6px; }
/* Micro animation until the person opens it once: a soft light sweep and a gentle halo. */
.pchip.ts.glow { animation: tsHalo 3.2s ease-in-out infinite; }
.pchip.ts.glow::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 50%; background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%); transform: skewX(-18deg); animation: tsSweep 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes tsSweep { 0%, 55% { left: -60%; } 85%, 100% { left: 130%; } }
@keyframes tsHalo { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } 50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.22); } }
@media (prefers-reduced-motion: reduce) { .pchip.ts.glow, .pchip.ts.glow::after { animation: none; } }
