:root { color-scheme: light; font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; color: #20201d; background: #f6f4ef; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 85% 0%, #e9dfd1 0, transparent 35%), #f6f4ef; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1080px) / 2)); border-bottom: 1px solid #ddd7cc; background: rgba(246,244,239,.88); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #20201d; text-decoration: none; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #fff; background: #977b5a; font-family: Georgia, "Noto Serif SC", serif; font-size: 14px; }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { font-family: Georgia, "Noto Serif SC", serif; font-size: 16px; font-weight: 600; letter-spacing: .16em; line-height: 1; }
.brand-copy small { color: #977b5a; font-size: 7px; font-weight: 700; letter-spacing: .1em; line-height: 1; }
.back { color: #6d655a; text-decoration: none; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.shell { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 96px; }
.intro { max-width: 620px; margin-bottom: 32px; }
.eyebrow { display: block; color: #977b5a; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 10px; }
h1 { margin: 0 0 14px; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(38px, 6vw, 64px); line-height: 1.08; font-weight: 500; }
h2 { margin: 0; font-size: 22px; }
p { color: #746d63; line-height: 1.7; }
.card { background: rgba(255,255,255,.86); border: 1px solid #e3ddd2; border-radius: 20px; padding: 28px; box-shadow: 0 18px 50px rgba(62,50,37,.07); }
.auth-card { max-width: 480px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #efebe4; padding: 5px; border-radius: 12px; margin-bottom: 24px; }
.tab { border: 0; border-radius: 9px; padding: 10px; background: transparent; color: #746d63; }
.tab.active { background: #fff; color: #20201d; box-shadow: 0 3px 12px rgba(40,30,20,.08); }
form { display: grid; gap: 18px; }
label { display: grid; gap: 8px; font-size: 14px; font-weight: 600; }
input, select { width: 100%; border: 1px solid #d8d1c6; background: #fff; border-radius: 11px; padding: 13px 14px; outline: none; }
input:focus, select:focus { border-color: #977b5a; box-shadow: 0 0 0 3px rgba(151,123,90,.13); }
input[aria-invalid="true"] { border-color: #a8463f; }
input[aria-invalid="true"]:focus { border-color: #a8463f; box-shadow: 0 0 0 3px rgba(168,70,63,.12); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 70px; }
.password-toggle { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); border: 0; border-radius: 8px; padding: 7px 9px; color: #765f45; background: transparent; font-size: 13px; font-weight: 650; }
.password-toggle:hover { background: #f3eee7; }
.password-toggle:focus-visible { outline: 2px solid #977b5a; outline-offset: 1px; }
.field-error { min-height: 18px; color: #9c3f38; font-size: 13px; font-weight: 500; line-height: 1.35; }
.form-error { border: 1px solid #e2b8b4; border-radius: 11px; padding: 11px 13px; color: #8e342e; background: #fff5f4; font-size: 14px; line-height: 1.45; }
.primary, .secondary { border-radius: 11px; padding: 12px 18px; font-weight: 650; }
.primary { border: 1px solid #27251f; background: #27251f; color: #fff; }
.primary:disabled { cursor: wait; opacity: .65; }
.secondary { border: 1px solid #d5cec2; background: #fff; color: #403b34; }
.account-head, .section-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.account-head > div { min-width: 0; }
#account-email { overflow-wrap: anywhere; }
#logout { flex: 0 0 auto; white-space: nowrap; }
.section-title { margin: 42px 0 18px; }
#claim-card { margin-top: 20px; border-color: #d8c7ad; }
.claim-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-top: 1px solid #eee7dd; }
.memory-switch { display: flex; align-items: center; grid-auto-flow: column; gap: 10px; cursor: pointer; color: #6d655a; font-size: 13px; }
.memory-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { position: relative; width: 44px; height: 24px; border-radius: 999px; background: #c9c2b7; transition: background .18s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.16); transition: transform .18s; }
.memory-switch input:checked + .switch-track { background: #77634a; }
.memory-switch input:checked + .switch-track::after { transform: translateX(20px); }
.memory-switch input:focus-visible + .switch-track { outline: 3px solid rgba(151,123,90,.2); outline-offset: 2px; }
.memory-card { display: grid; gap: 22px; }
.memory-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.memory-intro h3 { margin: 0 0 7px; font-size: 18px; }
.memory-intro p { margin: 0; max-width: 680px; font-size: 14px; }
.text-danger { flex: 0 0 auto; border: 0; background: transparent; color: #9c3f38; padding: 4px; font-size: 13px; }
.text-danger:disabled { color: #aaa39a; cursor: default; }
.memory-create-form { display: grid; grid-template-columns: 190px 1fr auto; gap: 12px; align-items: end; border-top: 1px solid #eee7dd; border-bottom: 1px solid #eee7dd; padding: 20px 0; }
.memory-add { min-height: 46px; }
.memory-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.memory-item { display: grid; gap: 12px; align-content: start; border: 1px solid #e4ded3; border-radius: 14px; padding: 17px; background: #fff; }
.memory-item.is-learning { border-style: dashed; background: #fbfaf7; }
.memory-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.memory-label { color: #876b4d; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.memory-source { color: #91887d; font-size: 11px; }
.memory-value { margin: 0; color: #292721; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.memory-actions { display: flex; gap: 12px; margin-top: auto; }
.memory-actions button { border: 0; background: transparent; color: #6f6253; padding: 0; font-size: 12px; }
.memory-actions button:last-child { color: #9c3f38; }
.memory-card .empty { grid-column: 1 / -1; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.report { display: block; color: inherit; text-decoration: none; background: #fff; border: 1px solid #e4ded3; border-radius: 16px; padding: 22px; transition: transform .15s, box-shadow .15s; }
.report:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(48,38,25,.08); }
.report strong { display: block; margin-bottom: 10px; }
.report span { color: #80776c; font-size: 13px; }
.message { position: fixed; right: 24px; bottom: 24px; max-width: 420px; padding: 13px 18px; border-radius: 12px; color: #fff; background: #27251f; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.message.error { background: #9c3f38; }
.empty { color: #81796f; padding: 26px; border: 1px dashed #d6cec2; border-radius: 14px; }
.hidden { display: none !important; }
@media (max-width: 700px) { .memory-create-form { grid-template-columns: 1fr; } .memory-intro { display: grid; } .text-danger { justify-self: start; padding-left: 0; } }
@media (max-width: 620px) { .shell { padding-top: 42px; } .account-head, .section-title { align-items: flex-start; } .card { padding: 22px; } .topbar-actions { gap: 10px; font-size: 13px; } }
