:root {
  color-scheme: light;
  --ink: #263e34;
  --muted: #7d8c7d;
  --line: #e2e8de;
  --paper: #fffefb;
  --canvas: #f5f6f0;
  --green: #426b59;
  --green-soft: #eaf2ea;
  --gold: #ae8341;
  --gold-soft: #faf1df;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #96b994; outline-offset: 3px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 30; top: 1rem; left: 1rem; padding: .7rem 1rem; border-radius: .6rem; background: var(--ink); color: white; }
.shell { width: min(1500px, calc(100% - 72px)); margin: 0 auto; }

.site-header { min-height: 104px; display: flex; align-items: center; gap: 40px; border-bottom: 1px solid var(--line); }
.brand { font-family: Georgia, serif; font-size: 2.35rem; font-weight: 700; line-height: 1; letter-spacing: -.08em; }
.brand span, .period { color: #94b686; }
.version-nav { display: flex; align-items: center; gap: 8px; padding: 5px; background: #edf0e9; border: 1px solid #e4e9df; border-radius: 999px; }
.version-nav a { border-radius: 999px; color: #78907d; padding: 9px 16px; font-size: .86rem; font-weight: 700; white-space: nowrap; transition: background .2s, color .2s; }
.version-nav a:hover { color: var(--ink); }
.version-nav a[aria-current] { color: var(--ink); background: var(--paper); box-shadow: 0 1px 5px #203b2714; }
.account { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .84rem; white-space: nowrap; }
.connection-dot, .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #bbc7b4; flex: none; }
.connection-dot.connected { background: #7da988; box-shadow: 0 0 0 4px #dcebdd; }
.account button { border: 1px solid #d7e1d4; border-radius: 10px; background: var(--paper); color: var(--ink); padding: 10px 17px; margin-left: 8px; font-weight: 700; }
.account button:hover { border-color: #a8c0a5; }

main { padding-bottom: 96px; }
.hero { min-height: 315px; display: flex; justify-content: space-between; align-items: center; gap: 40px; overflow: hidden; }
.hero-copy { max-width: 760px; position: relative; z-index: 1; }
.eyebrow { margin: 0 0 18px; color: #93a18f; letter-spacing: .27em; font-size: .74rem; font-weight: 800; }
.hero h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3.8rem, 7vw, 6.5rem); font-weight: 500; letter-spacing: -.065em; line-height: 1.1; white-space: nowrap; }
.hero h1 > span:not(.period) { color: #b9c8ad; }
.hero-description { margin: 20px 0 0; max-width: 630px; color: #6e806f; font-size: 1.04rem; line-height: 1.9; }
.hero-mark { position: relative; width: 270px; height: 270px; flex: none; display: grid; place-items: center; }
.orbit { position: absolute; border: 1px solid #dce6d6; border-radius: 50%; }
.orbit-one { inset: 16px; }
.orbit-two { inset: 55px; border-color: #cbdcc8; }
.hero-mark::before, .hero-mark::after { content: ""; width: 10px; height: 10px; border-radius: 50%; position: absolute; background: #b7cbad; }
.hero-mark::before { top: 28px; left: 53px; }
.hero-mark::after { bottom: 38px; right: 47px; background: #d9c498; }
.mark-core { width: 93px; height: 93px; border-radius: 50%; display: grid; place-items: center; background: #e8efe3; color: #6b8d71; font-family: Georgia, serif; font-size: 1.65rem; letter-spacing: -.08em; box-shadow: 0 0 0 16px #e8efe35c; }
.mark-core span { color: var(--gold); }

.timer-section, .projects-section { margin-top: 24px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 26px; }
.section-heading h2 { font-family: Georgia, "Songti SC", serif; font-size: clamp(1.7rem, 2.8vw, 2.2rem); letter-spacing: -.035em; margin: 0; }
.section-heading .eyebrow { margin-bottom: 10px; }
.section-heading > p, .section-description { margin: 0; color: var(--muted); font-size: .95rem; }
.timer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.timer-card { min-height: 267px; text-align: left; border-radius: 25px; padding: 28px 30px; display: flex; flex-direction: column; align-items: flex-start; transition: transform .2s, box-shadow .2s, border-color .2s; }
.timer-card:not(:disabled):hover { transform: translateY(-3px); box-shadow: 0 14px 35px #334c2c14; }
.timer-card:disabled { opacity: .75; }
.recover-card { background: #ebf2eb; border: 1px solid #d7e5d7; color: #346250; }
.create-card { background: #faf2e4; border: 1px solid #edddba; color: #986e2f; }
.timer-card.is-active { border-width: 2px; box-shadow: 0 0 0 4px #ffffffa8; }
.card-top { width: 100%; display: flex; align-items: flex-start; justify-content: space-between; }
.timer-icon { width: 57px; height: 57px; border-radius: 18px; display: grid; place-items: center; font-size: 2rem; line-height: 1; background: #ffffff9c; border: 1px solid #ffffffbc; }
.create-icon { font-size: 1.85rem; }
.card-index { font-size: .69rem; letter-spacing: .16em; font-weight: 800; opacity: .55; margin-top: 9px; }
.timer-name { font-family: Georgia, serif; font-size: clamp(2.45rem, 4vw, 3.8rem); line-height: 1; margin-top: 25px; letter-spacing: -.055em; }
.timer-translation { margin-top: 10px; font-size: .9rem; opacity: .78; }
.timer-action { margin-top: auto; width: 100%; display: flex; justify-content: space-between; align-items: center; padding-top: 22px; font-size: .87rem; font-weight: 750; }
.timer-action span { font-size: 1.35rem; line-height: .7; }
.live-strip { margin-top: 16px; padding: 15px 20px; border: 1px solid #d9e5d7; background: var(--paper); border-radius: 14px; display: flex; align-items: center; gap: 13px; color: #577563; }
.live-dot { background: #62a777; box-shadow: 0 0 0 5px #dcefe0; margin-right: 6px; }
.live-strip strong { font-variant-numeric: tabular-nums; font-size: 1.15rem; color: var(--ink); margin-left: auto; }
.live-hint { color: #9baa9c; font-size: .78rem; margin-left: 10px; }

.projects-section { margin-top: 93px; }
.projects-heading { align-items: center; }
.section-description { margin-top: 12px; line-height: 1.7; }
.day-selector { border: 1px solid #dae4d8; background: var(--paper); display: flex; align-items: center; border-radius: 13px; padding: 4px; }
.day-selector button { width: 36px; height: 37px; border: 0; border-radius: 9px; background: transparent; color: #69826d; font-size: 1.5rem; line-height: 1; }
.day-selector button:hover:not(:disabled) { background: #eef3ea; }
.day-selector button:disabled { opacity: .35; }
.day-selector input { border: 0; color: var(--ink); background: transparent; padding: 7px 6px; font-weight: 700; outline: none; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }
.summary-card { display: flex; flex-direction: column; gap: 13px; background: #fffefbba; border: 1px solid var(--line); border-radius: 17px; padding: 22px 24px; }
.summary-card span { color: #93a190; font-size: .82rem; }
.summary-card strong { font-family: Georgia, "Songti SC", serif; font-size: 1.55rem; font-weight: 600; }
.project-panel { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--paper); box-shadow: 0 8px 28px #3c58400a; }
.project-panel-title { padding: 25px 28px; display: flex; justify-content: space-between; color: #778b79; font-weight: 700; }
.project-head, .project-row { display: grid; grid-template-columns: minmax(230px, 2.1fr) minmax(100px, .8fr) minmax(160px, 1.25fr) minmax(160px, 1.25fr) 28px; gap: 20px; align-items: center; }
.project-head { padding: 13px 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f7f9f4; color: #93a190; font-size: .8rem; font-weight: 700; }
.project-row { padding: 22px 28px; border-bottom: 1px solid #edf0e9; }
.project-row:last-child { border-bottom: 0; }
.project-main { min-width: 0; }
.project-type { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: .68rem; font-weight: 800; letter-spacing: .04em; margin-bottom: 9px; }
.project-type.recover { background: #eaf2e9; color: #548268; }
.project-type.create { background: #faf0df; color: #ad8240; }
.project-name { display: block; width: 100%; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--ink); font-weight: 700; padding: 2px 0 5px; outline: none; }
.project-name:hover, .project-name:focus { border-color: #b7cbb6; }
.project-clock { display: block; color: #9aaa99; margin-top: 7px; font-size: .75rem; }
.project-duration { font-variant-numeric: tabular-nums; font-weight: 750; color: #5e7f68; }
.project-row:has(.project-type.create) .project-duration { color: var(--gold); }
.project-note { display: block; width: 100%; min-height: 58px; resize: vertical; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #516a57; padding: 7px 8px; line-height: 1.55; outline: none; }
.project-note::placeholder { color: #b2beb1; }
.project-note:hover, .project-note:focus { border-color: #dce8d8; background: #fbfcf9; }
.delete-project { width: 26px; height: 26px; border: 0; background: transparent; color: #a4b1a2; font-size: 1.35rem; line-height: 1; border-radius: 5px; }
.delete-project:hover { background: #f9e8e5; color: #aa5e56; }
.empty-projects { padding: 64px 24px; text-align: center; color: #9aaa99; }
.empty-projects strong { display: block; font-size: 1.1rem; color: #718b75; margin: 0 0 10px; }
.empty-projects p { margin: 0; font-size: .9rem; }
.site-footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding: 27px 0 45px; color: #8a9b89; }
.site-footer > span { font-family: Georgia, serif; font-size: 1.2rem; color: var(--ink); }
.site-footer small { font-family: inherit; font-size: .75rem; color: #9aaa99; margin-left: 10px; }
.site-footer a { font-size: .83rem; font-weight: 700; }
.site-footer a:hover { color: var(--green); }

dialog { width: min(480px, calc(100% - 28px)); max-height: calc(100% - 30px); border: 1px solid #d9e5d7; border-radius: 22px; background: var(--paper); color: var(--ink); padding: 30px; box-shadow: 0 22px 80px #162a1c30; }
dialog::backdrop { background: #172c23aa; backdrop-filter: blur(3px); }
.dialog-top { display: flex; align-items: start; justify-content: space-between; }
.dialog-top .eyebrow { margin: 7px 0 0; }
.close-dialog { border: 0; background: #f0f3ed; width: 32px; height: 32px; border-radius: 50%; font-size: 1.2rem; color: #78917b; }
dialog h2 { font-family: Georgia, "Songti SC", serif; font-size: 1.9rem; margin: 17px 0 9px; }
dialog p { color: #849684; line-height: 1.7; }
.recovery-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 25px; }
.recovery-options button { border: 1px solid #dce8d8; border-radius: 16px; background: #f2f7f0; color: #4e755c; padding: 23px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.recovery-options button:hover { border-color: #9cbaa0; transform: translateY(-2px); }
.recovery-options button span { font-size: 2.1rem; }
.recovery-options button strong { font-family: Georgia, serif; font-size: 1.2rem; }
.recovery-options button small { color: #829983; }
.password-label { display: block; color: #617a64; font-size: .9rem; font-weight: 700; margin: 27px 0 15px; }
.password-label input { width: 100%; display: block; margin-top: 9px; padding: 13px 14px; border-radius: 10px; border: 1px solid #cadac7; outline: none; }
.password-label input:focus { border-color: #8fb593; }
.submit-button { width: 100%; border: 0; border-radius: 11px; background: var(--green); color: white; font-weight: 700; padding: 14px; }
.submit-button:hover { background: #315e47; }
.form-error { min-height: 1.2em; color: #b5534b; font-size: .83rem; }
.toast { position: fixed; z-index: 40; left: 50%; bottom: 28px; transform: translateX(-50%); max-width: min(90vw, 520px); border-radius: 12px; background: #284b3b; color: white; padding: 13px 19px; box-shadow: 0 9px 35px #223c2c3b; font-size: .9rem; }
.no-script { padding: 20px; background: #fbe9e8; }

@media (max-width: 1050px) {
  .hero-mark { width: 190px; height: 190px; }
  .orbit-one { inset: 10px; } .orbit-two { inset: 40px; }
  .mark-core { width: 76px; height: 76px; font-size: 1.4rem; }
  .hero h1 { font-size: clamp(3.3rem, 7vw, 5.5rem); }
  .project-head, .project-row { grid-template-columns: minmax(180px, 1.7fr) minmax(90px, .7fr) minmax(130px, 1fr) minmax(130px, 1fr) 25px; gap: 10px; }
}
@media (max-width: 760px) {
  .shell { width: min(100% - 32px, 600px); }
  .site-header { min-height: 80px; flex-wrap: wrap; gap: 10px; padding: 15px 0; }
  .brand { font-size: 1.95rem; }
  .version-nav { margin-left: auto; }
  .version-nav a { padding: 7px 10px; font-size: .73rem; }
  .account { width: 100%; border-top: 1px solid var(--line); padding-top: 10px; }
  .account button { margin-left: auto; }
  .hero { min-height: auto; padding: 70px 0 55px; }
  .hero-mark { display: none; }
  .hero h1 { white-space: normal; font-size: clamp(3.25rem, 12vw, 5rem); }
  .hero-description { font-size: .94rem; }
  .section-heading { align-items: start; flex-direction: column; gap: 10px; }
  .timer-grid { grid-template-columns: 1fr; gap: 12px; }
  .timer-card { min-height: 220px; padding: 23px; }
  .timer-name { margin-top: 15px; }
  .live-strip { flex-wrap: wrap; }
  .live-hint { display: none; }
  .projects-section { margin-top: 75px; }
  .projects-heading { align-items: stretch; }
  .day-selector { align-self: flex-start; }
  .summary-grid { gap: 8px; }
  .summary-card { padding: 14px 12px; border-radius: 12px; gap: 12px; }
  .summary-card span { font-size: .7rem; }
  .summary-card strong { font-size: 1rem; }
  .project-head { display: none; }
  .project-row { grid-template-columns: 1fr auto; grid-template-areas: "main duration" "feeling feeling" "thinking thinking" "delete delete"; gap: 9px 12px; padding: 20px; }
  .project-main { grid-area: main; }
  .project-duration { grid-area: duration; align-self: start; padding-top: 28px; white-space: nowrap; }
  .project-note.feeling { grid-area: feeling; }
  .project-note.thinking { grid-area: thinking; }
  .project-note { min-height: 42px; border-color: #edf1e9; }
  .delete-project { grid-area: delete; justify-self: end; }
  .site-footer small { display: none; }
}
