:root {
  --ink: #2a2a34;
  --muted: #747582;
  --paper: #fffdf9;
  --cream: #f6efe5;
  --line: #e9dfd2;
  --orange: #df744d;
  --orange-deep: #b94e36;
  --yellow: #f3bd68;
  --blue: #7897b7;
  --green: #7da38a;
  --shadow: 0 18px 50px rgba(112, 75, 45, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 12% 0%, #fffaf1 0, transparent 32%), var(--cream); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1100px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 56px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 24px; }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 13px; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; color: #fff9ef; background: var(--orange); border-radius: 16px 16px 16px 4px; font-family: Georgia, serif; font-size: 25px; box-shadow: 8px 8px 0 #f0c78e; transform: rotate(-3deg); }
.brand small, .eyebrow { display: block; color: var(--orange-deep); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.brand h1 { margin: 3px 0 0; font-size: 22px; letter-spacing: .03em; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.today-pill { display: flex; align-items: baseline; gap: 6px; padding: 10px 14px; border: 1px solid var(--line); background: rgba(255,253,249,.8); border-radius: 999px; color: var(--muted); font-size: 12px; }
.today-pill strong { color: var(--orange-deep); font-size: 20px; }
.today-pill em { color: #aba09a; font-style: normal; }
.account-button, .secondary, .icon-button, .back { border: 1px solid var(--line); color: var(--ink); background: rgba(255,253,249,.76); border-radius: 12px; padding: 11px 15px; }
.account-button:hover, .secondary:hover, .back:hover { border-color: var(--orange); color: var(--orange-deep); }
.panel { background: rgba(255,253,249,.88); border: 1px solid rgba(225, 211, 195, .86); border-radius: 24px; box-shadow: var(--shadow); }
.hero { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; min-height: 380px; overflow: hidden; padding: 48px 56px; background: linear-gradient(120deg, #fffdf9 0%, #fff8ee 60%, #f8e4d2 100%); }
.hero h2 { margin: 12px 0 14px; font-family: Georgia, "Songti SC", serif; font-size: clamp(34px, 5vw, 58px); line-height: 1.13; letter-spacing: -.04em; }
.hero h2 span { color: var(--orange); }
.hero-copy > p:not(.eyebrow) { max-width: 500px; margin: 0; color: var(--muted); line-height: 1.8; font-size: 15px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 21px 0 25px; }
.hero-tags span { padding: 7px 10px; color: #91624e; background: #f8e8d9; border-radius: 999px; font-size: 12px; }
.hero-art { position: relative; min-height: 270px; }
.paper-card { position: absolute; z-index: 2; top: 30px; left: 50%; width: 188px; height: 236px; padding: 23px 20px; color: #50443d; background: #fffaf0; border: 1px solid #e7c89f; box-shadow: 17px 21px 0 rgba(221, 158, 95, .22), 0 20px 32px rgba(113,77,48,.12); transform: translateX(-50%) rotate(7deg); }
.paper-card:before { content: ""; position: absolute; inset: 11px; border: 1px solid #eacda9; pointer-events: none; }
.paper-card span { position: relative; display: block; color: var(--orange); font-size: 11px; }
.paper-card b { position: relative; display: block; margin-top: 28px; font-family: "STKaiti", "KaiTi", serif; font-size: 30px; line-height: 1.55; }
.paper-card i { position: absolute; right: 24px; bottom: 21px; color: var(--yellow); font-size: 23px; font-style: normal; }
.orbit { position: absolute; left: 50%; top: 50%; border: 1px solid #e2b982; border-radius: 50%; transform: translate(-50%, -50%) rotate(-18deg); }
.orbit-one { width: 330px; height: 150px; }
.orbit-two { width: 300px; height: 235px; border-color: #e6c2a3; transform: translate(-50%, -50%) rotate(51deg); }
.ink-dot { position: absolute; width: 10px; height: 10px; background: var(--orange); border-radius: 50%; }
.dot-one { top: 54px; left: 7%; }
.dot-two { right: 6%; bottom: 23px; width: 7px; height: 7px; background: var(--blue); }
.primary { border: 0; color: white; background: var(--orange); border-radius: 12px; padding: 12px 17px; box-shadow: 0 8px 18px rgba(197, 94, 62, .18); }
.primary:hover { background: var(--orange-deep); transform: translateY(-1px); }
.primary.large { padding: 14px 20px; font-weight: 800; font-size: 15px; }
.primary span { margin-left: 12px; font-size: 18px; }
.dashboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.stat { padding: 18px 20px; }
.stat span, .stat small { display: block; color: var(--muted); font-size: 12px; }
.stat strong { display: inline-block; margin: 8px 5px 2px 0; color: var(--orange-deep); font-size: 29px; }
.goal { padding: 27px 32px 25px; }
.goal-head, .recent-head, .section-head, .study-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.goal h2, .recent h2, .how h2, .auth-panel h2 { margin: 6px 0; font-family: Georgia, "Songti SC", serif; font-size: 24px; }
.goal p, .recent-head > p, .hint, .message { color: var(--muted); font-size: 13px; line-height: 1.7; }
.today-goal { text-align: right; }
.today-goal strong { display: block; color: var(--orange-deep); font-size: 25px; }
.today-goal span { color: var(--muted); font-size: 12px; }
.goal-progress, .progress-track { height: 9px; margin: 20px 0 18px; overflow: hidden; background: #f2e7db; border-radius: 99px; }
.goal-progress span, .progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--orange), var(--yellow)); border-radius: inherit; transition: width .35s ease; }
.goal-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.goal-summary div { padding: 13px 15px; background: #fbf2e7; border-radius: 15px; }
.goal-summary span, .goal-summary small { color: var(--muted); font-size: 11px; }
.goal-summary strong { display: block; margin: 5px 3px 0 0; font-size: 22px; }
.checkin-calendar { display: grid; grid-template-columns: repeat(15, 1fr); gap: 5px; margin-top: 18px; }
.day-dot { min-height: 26px; padding-top: 6px; border: 1px solid #eee2d5; border-radius: 8px; color: #a79a8e; background: #fffaf5; text-align: center; font-size: 10px; }
.day-dot.done { color: #fff; background: var(--green); border-color: var(--green); }
.day-dot.today { border: 2px solid var(--orange); color: var(--orange-deep); font-weight: 800; }
.recent { margin-top: 18px; padding: 27px 32px; }
.recent-head > p { margin: 0; max-width: 280px; text-align: right; }
.history-table-wrap { overflow-x: auto; }
.history-table { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 13px; }
.history-table th { color: #9a8e84; font-size: 11px; font-weight: 600; text-align: left; }
.history-table th, .history-table td { padding: 11px 10px; border-bottom: 1px solid #f1e7dc; }
.history-table td strong { color: var(--orange-deep); }
.study { margin-top: 18px; padding: 23px 30px 31px; }
.study-top { align-items: center; color: var(--muted); font-size: 13px; }
.study-top > span:last-child { color: var(--orange-deep); font-size: 11px; }
.back { padding: 8px 12px; }
.study .progress-track { height: 6px; margin: 17px 0 22px; }
.card { max-width: 790px; margin: 0 auto; padding: 30px 34px 34px; border: 1px solid #eadbcb; border-radius: 20px; background: linear-gradient(145deg, #fffdf9, #fff8ef); }
.card-meta { display: flex; justify-content: space-between; gap: 15px; color: var(--orange-deep); font-size: 12px; }
.card-meta span:last-child { color: #988b80; text-align: right; }
.card h2 { margin: 23px 0 17px; font-family: Georgia, "Songti SC", serif; font-size: 25px; }
.question-text, .answer-text { white-space: pre-wrap; font-size: 17px; line-height: 2; }
.question-text { min-height: 105px; color: #4e4a4a; }
.answer-text { color: #50423b; }
.show-answer { margin-top: 15px; }
.show-answer span { margin-left: 8px; }
.answer-reveal { margin-top: 22px; padding-top: 20px; border-top: 1px dashed #e5d7c8; }
.answer-label { margin-bottom: 9px; color: var(--orange-deep); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.rating-title { margin: 25px 0 11px; color: var(--muted); font-size: 12px; }
.ratings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ratings button { padding: 11px 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
.ratings button:hover { transform: translateY(-1px); }
.ratings small { display: block; margin-top: 3px; color: #9d9188; font-size: 10px; }
.ratings .again { border-color: #e5b2a2; color: #b95d49; }
.ratings .hard { border-color: #ebd0a2; color: #a8752d; }
.ratings .good { border-color: #b8d0bc; color: #4e835b; }
.ratings .easy { border-color: #a9c2d9; color: #4a7697; }
.complete { padding: 60px 10px 30px; text-align: center; }
.complete > span { color: var(--yellow); font-size: 35px; }
.complete h2 { margin: 16px 0 7px; font-family: Georgia, "Songti SC", serif; font-size: 28px; }
.complete p { color: var(--muted); margin: 0 0 22px; }
.how { margin-top: 18px; padding: 27px 32px; }
.how > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-top: 20px; }
.how article { display: flex; align-items: flex-start; gap: 12px; padding: 16px; background: #fbf3e9; border-radius: 15px; }
.how article b { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; color: #fff; background: var(--orange); border-radius: 50%; font-size: 12px; }
.how article p { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.auth-panel { margin-bottom: 18px; padding: 23px 28px; }
.section-head { align-items: center; }
.icon-button { padding: 4px 11px; font-size: 24px; line-height: 1; }
.auth-panel h2 { font-size: 19px; }
.auth-panel form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.auth-panel label { display: grid; gap: 6px; color: #766a61; font-size: 12px; }
.auth-panel input { width: 220px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; outline: 0; }
.auth-panel input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(223,116,77,.12); }
.auth-actions { display: flex; gap: 8px; }
.message { margin: 14px 0 0; }
.welcome { margin: 18px 0 6px; }
footer { margin-top: 27px; color: #a2958a; text-align: center; font-size: 11px; }
.hidden { display: none !important; }

@media (max-width: 760px) {
  .shell { width: min(100% - 22px, 600px); padding-top: 18px; }
  .topbar { align-items: flex-start; }
  .brand h1 { font-size: 18px; }
  .brand-mark { width: 40px; height: 40px; font-size: 21px; }
  .today-pill { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 32px 25px 20px; }
  .hero h2 { font-size: 40px; }
  .hero-art { min-height: 260px; }
  .dashboard { grid-template-columns: repeat(2, 1fr); }
  .goal, .recent, .how, .study { padding-left: 20px; padding-right: 20px; }
  .goal-head, .recent-head { display: block; }
  .today-goal { margin-top: 13px; text-align: left; }
  .checkin-calendar { grid-template-columns: repeat(10, 1fr); }
  .how > div { grid-template-columns: 1fr; }
  .card { padding: 23px 19px 25px; }
  .card-meta { display: block; }
  .card-meta span { display: block; }
  .card-meta span:last-child { margin-top: 6px; text-align: left; }
  .question-text, .answer-text { font-size: 15px; line-height: 1.9; }
  .ratings { grid-template-columns: repeat(2, 1fr); }
  .auth-panel form { display: grid; }
  .auth-panel input { width: 100%; }
  .auth-actions { flex-wrap: wrap; }
}
