@font-face{font-family:GardenTen;src:local('TenMincho-Regular'),local('Ten Mincho');font-display:swap}
:root{--paper-grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.68' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23867260' opacity='.08' filter='url(%23n)' d='M0 0h160v160H0z'/%3E%3C/svg%3E")}
:root,:root[data-ui=notebook]{--sheet:#e7dcc5;--sheet-ink:#493740;--sheet-muted:#746052;--sheet-rule:#b9a18c;--sheet-window:#443943;--sheet-tab:#d8c9ae;--focus:#e5bf91}
.composer,.history-panel,.memory{font-family:GardenTen,serif;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.68' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23867260' opacity='.08' filter='url(%23n)' d='M0 0h160v160H0z'/%3E%3C/svg%3E");outline-color:#cbb69a66}
.intro h1,.brand,.specimen-caption h2,.composer h2,.panel-header h2,.history-item strong,.memory h2,:root[data-ui=notebook] .composer h2,:root[data-ui=notebook] .panel-header h2,:root[data-ui=notebook] .memory h2{font-family:GardenTen,serif;font-weight:400}
.intro h1{letter-spacing:.13em}.brand{letter-spacing:.15em}
.composer h2{font-size:22px;letter-spacing:.12em}.composer textarea,.memory #memoryText{font-family:GardenTen,serif;letter-spacing:.04em}
.composer textarea::placeholder{font-family:GardenTen,serif}.composer time,.sheet-register,.panel-header p,.folder-tabs button span,.specimen-tag,.card-meta,.memory-top,.memory time,.specimen-file figcaption{font-family:GardenTen,serif;font-variant-numeric:tabular-nums}
.sheet-tab,:root[data-ui=notebook] .sheet-tab{font-family:GardenTen,serif;font-size:13px;letter-spacing:.15em;padding-top:4px}
.mood,.plant-button,.folder-tabs button,.panel-foot,.panel-foot button,.memory-bottom button,.memory .memory-description,.file-date,.diary-label,.memory-reason,.memory-bottom{font-family:GardenTen,serif;letter-spacing:.05em}
.mood[aria-pressed=true]{border-color:#9c7e79}.plant-button:hover{background:#6c505b}.plant-button{letter-spacing:.06em}
.panel-header{position:relative;isolation:isolate;min-height:118px;padding-top:28px;padding-bottom:23px;overflow:hidden}.panel-header>div{position:relative;z-index:1}.panel-header::before{content:'';position:absolute;z-index:-1;pointer-events:none;right:65px;top:7px;width:350px;height:104px;background:url('assets/flora-script.svg') center/contain no-repeat;opacity:.085;transform:rotate(-7deg)}
.panel-header h2{font-size:32px;letter-spacing:.18em;line-height:1.65;margin-bottom:7px}.panel-header p{font-size:12px;letter-spacing:.12em}.icon-button{border-color:#b9a18c;opacity:.85}
.folder-tabs button{background:#d7c6aa;font-size:14px;letter-spacing:.13em}.folder-tabs button[aria-selected=true]{background:#69505a;color:#f2e5ce}.folder-tabs button span{font-size:11px;letter-spacing:0}
.history-item{background:#ab927f;padding-top:27px}.history-item::before{background:#e9dfc9}.history-item:hover::before{background:#f0e6d1}.history-item>img{background:#463b46;border:1px solid #8c7776;padding:7px}.history-item strong{font-size:19px;letter-spacing:.06em;line-height:1.9}.specimen-tag{font-size:11px;letter-spacing:.1em;top:4px}.card-meta,.history-item time{font-size:11px;line-height:1.9}.card-meta{border-color:#bba68e}
.history-item strong,.memory h2{text-wrap:balance}.memory h2{font-size:25px;letter-spacing:.09em}.memory .memory-description{font-size:14px;line-height:2}.memory #memoryText{font-size:16px;line-height:2.1}.specimen-file figure img{border-color:#8c7776;background:#463b46}.memory-top{background-color:var(--sheet)}
.panel-foot{background-color:var(--sheet)}.panel-foot button,.panel-foot details,.panel-foot details p{font-size:12px}.panel-foot summary{font-family:GardenTen,serif}
.save-note{font-size:11px}.specimen-caption p,.specimen-caption time,.specimen-caption button{font-family:GardenTen,serif}
:root[data-ui=notebook] .composer{outline-style:solid}:root[data-ui=notebook] .pencil-line{opacity:.25}:root[data-ui=notebook] .history-item:nth-child(3n+1){transform:none}
@media(max-width:700px){.panel-header{min-height:111px;padding-top:23px;padding-bottom:20px}.panel-header h2,:root[data-ui=notebook] .panel-header h2{font-size:26px;letter-spacing:.14em}.panel-header::before{right:35px;top:8px;width:245px;height:90px;opacity:.07}.history-item{padding:25px 10px 10px}.history-item strong{font-size:16px;letter-spacing:.01em;line-height:1.85}.card-meta,.history-item time,.specimen-tag{font-size:11px}.composer h2,:root[data-ui=notebook] .composer h2{font-size:21px}.sheet-register,.composer time,.save-note{font-size:11px}.memory h2{font-size:23px}.memory #memoryText{font-size:16px}.memory .memory-description{font-size:14px}.panel-foot button,.panel-foot details,.panel-foot details p{font-size:11px}.folder-tabs button{font-size:13px}.composer-bottom{gap:5px}.plant-button{font-size:12px;padding:10px;min-width:125px}}
@media(max-width:350px){.history-item{padding:25px 8px 9px}.history-item strong{font-size:15px;letter-spacing:0}.composer{padding:16px}.save-note{font-size:11px}.plant-button{min-width:116px;font-size:11px}.panel-header h2,:root[data-ui=notebook] .panel-header h2{font-size:24px}.panel-foot button{font-size:11px}}

/* 空想植物誌：題字の筆致と、物語を読む活字。 */
:root{font-family:GardenTen,serif}
.intro h1 picture{display:block}.intro h1 .garden-heading{display:block;width:210px;height:auto}.intro h1{min-height:122px}
@media(max-width:700px){.garden .intro h1{min-height:43px;display:flex;align-items:center}.intro h1 .garden-heading{width:240px;max-width:100%;height:auto}}
.garden-footer button{white-space:nowrap;flex-shrink:0}
@media(max-width:700px){.garden .garden-footer>span{max-width:calc(100% - 110px)}}
@media(min-width:701px){.intro{transform:translateY(-24px)}}
.intro h1,.brand,.specimen-caption h2,.composer h2,.panel-header h2,.history-item strong,.memory h2,:root[data-ui=notebook] .composer h2,:root[data-ui=notebook] .panel-header h2,:root[data-ui=notebook] .memory h2{font-family:GardenTen,serif;letter-spacing:.035em;font-weight:400;text-wrap:balance}
.brand{gap:10px}.brand .brand-wordmark{display:block;width:154px;height:37px;object-fit:contain}.brand>svg{width:28px;height:36px}
.intro h1{font-size:clamp(31px,2.7vw,39px);line-height:1.65}.intro p{font-size:16px;line-height:2}.mode-button,.nav-button{font-size:14px;font-weight:400}.tree-note{font-size:13px;font-weight:400}.tree-hint{font-size:13px}.garden-footer{font-size:12px}.garden-footer button{font-size:12px}
.panel-header h2{font-size:34px}.composer h2{font-size:23px}.history-item strong{font-size:20px;line-height:1.8;min-height:1.8em}.memory h2{font-size:27px}
.mood,.plant-button,.folder-tabs button{font-size:14px;letter-spacing:.02em}.sheet-register,.composer time,.save-note,.card-meta,.history-item time,.specimen-tag,.panel-header p,.folder-tabs button span,.memory-top,.file-date,.memory time,.diary-label,.memory-reason,.memory-bottom,.specimen-file figcaption{font-size:12px;letter-spacing:.02em}
.panel-foot button,.panel-foot details,.panel-foot details p{font-size:13px}.memory-bottom button{font-size:14px}.memory .memory-description{font-size:15px}.composer textarea::placeholder{font-size:15px}
@media(max-width:1050px) and (min-width:701px){.intro p{font-size:14px}.intro h1{font-size:31px}.composer{width:334px}.mood{font-size:13px}.plant-button{min-width:132px;font-size:13px}.save-note{font-size:11px}}
@media(max-width:700px){.brand .brand-wordmark{width:130px;height:32px}.brand>svg{width:22px;height:30px}.brand{gap:7px}.intro h1{font-size:27px;line-height:1.6}.intro p{font-size:14px;line-height:1.9}.mode-button{font-size:14px}.tree-note{font-size:11px}.specimen-caption h2{font-size:24px}.panel-header h2,:root[data-ui=notebook] .panel-header h2{font-size:29px}.composer h2,:root[data-ui=notebook] .composer h2{font-size:23px}.history-item strong{font-size:17px;line-height:1.8}.memory h2{font-size:25px}.mood,.plant-button,.folder-tabs button{font-size:14px}.mood{padding:3px;gap:4px}.mood-row{grid-template-columns:24px 1fr;gap:4px}.sheet-register,.composer time,.save-note,.card-meta,.history-item time,.specimen-tag,.panel-header p,.folder-tabs button span,.memory-top,.file-date,.memory time,.diary-label,.memory-reason,.memory-bottom,.specimen-file figcaption{font-size:12px}.plant-button{min-width:138px;padding:10px 9px}.panel-foot button,.panel-foot details,.panel-foot details p{font-size:12px}.garden-footer{font-size:11px}.garden-footer>span{max-width:230px}.memory .memory-description{font-size:15px}}
@media(max-width:350px){.brand .brand-wordmark{width:120px;height:30px}.history-item strong{font-size:16px;letter-spacing:0}.composer{padding:16px}.mood-row{display:block}.moods{gap:2px}.mood{font-size:13px}.composer-bottom{flex-wrap:wrap;justify-content:flex-end;gap:10px}.save-note{font-size:12px;margin-right:auto}.plant-button{font-size:14px;min-width:138px}.panel-header h2,:root[data-ui=notebook] .panel-header h2{font-size:27px}.panel-foot{gap:7px}.panel-foot button{font-size:12px}.panel-foot details{max-width:52%}}

/* 紙だけの縁をにじませ、操作と文字は独立した鮮明な層に保つ。 */
.garden .composer{isolation:isolate;background:none;border-color:transparent;outline:none;box-shadow:none}
.composer::before{content:'';position:absolute;inset:-36px -8px -8px;z-index:-1;pointer-events:none;background:url('assets/paper-sheet.svg') center/100% 100% no-repeat;filter:none}
.garden .sheet-tab{isolation:isolate;background:none;border:0;clip-path:none;left:0;top:-28px}
.sheet-tab::before{display:none}
.garden .history-panel,.garden .memory{isolation:isolate;background-color:var(--sheet);background-image:var(--paper-grain);border-color:transparent;outline:none;box-shadow:none;-webkit-mask-image:linear-gradient(to right,transparent,#000 3px,#000 calc(100% - 3px),transparent),linear-gradient(to bottom,transparent,#000 3px,#000 calc(100% - 3px),transparent);-webkit-mask-composite:source-in;mask-image:linear-gradient(to right,transparent,#000 3px,#000 calc(100% - 3px),transparent),linear-gradient(to bottom,transparent,#000 3px,#000 calc(100% - 3px),transparent);mask-composite:intersect}
.memory-shade{position:fixed;inset:0;z-index:8;background:#21172355;pointer-events:none;transition:opacity .2s;opacity:0}
.garden:has(.memory:not([hidden])) .memory-shade{opacity:1;pointer-events:auto}
.garden .memory{z-index:9;clip-path:none;-webkit-mask:none;mask:none;box-shadow:0 20px 55px #1c111e66;border-radius:2px}
.plant-ecology{margin:22px 0 27px;display:grid;gap:18px}.plant-ecology>div{padding-top:12px;border-top:1px solid var(--sheet-rule)}.plant-ecology>.ecology-heading{font-size:17px;letter-spacing:.12em;padding-top:18px}.plant-ecology dt{font-family:GardenTen,serif;font-size:12px;letter-spacing:.1em;color:var(--sheet-muted);margin-bottom:5px}.plant-ecology dd{font-family:GardenTen,serif;margin:0;font-size:15px;line-height:2.05;color:var(--sheet-ink);overflow-wrap:anywhere;text-wrap:pretty}
@media(min-width:701px){.specimen-file figure{position:sticky;top:76px;align-self:start}}
@media(max-width:700px){.plant-ecology{gap:17px;margin:20px 0 25px}.plant-ecology dd{font-size:16px;line-height:2}.plant-ecology dt{font-size:12px}.specimen-file figure{position:static}}

/* Three small ink drawings on the collecting slip. */

/* On a short desktop the title uses its existing single-line drawing. */
@media (min-width:701px) and (max-height:740px){
  .header{top:clamp(8px,2.5dvh,18px)}
  .intro{top:clamp(64px,13dvh,94px);transform:none}
  .intro h1{min-height:0;margin-bottom:10px}
  .intro h1 .garden-heading{width:230px}
  .intro p{font-size:14px;line-height:1.8}
  .composer{bottom:clamp(53px,9dvh,66px)}
  .sheet-register{padding-bottom:6px;margin-bottom:6px}
  .composer textarea{min-height:56px;height:clamp(56px,11dvh,78px);margin:6px 0}
  .composer-bottom{margin-top:7px;padding-top:7px}
  .specimen-caption{bottom:54px}
  .tree-hint{bottom:19px}
  .garden-footer{bottom:max(10px,env(safe-area-inset-bottom))}
}
@media (min-width:701px) and (max-height:520px){
  .intro{left:max(218px,26%);top:12px;z-index:4;pointer-events:none}
  .intro h1{margin-bottom:4px}
  .intro h1 .garden-heading{width:178px}
  .intro p{font-size:12px;line-height:1.5}
  .composer{bottom:47px;padding-top:10px;padding-bottom:10px}
  .composer textarea{min-height:44px;height:44px;max-height:60px;margin:4px 0}
  .composer-bottom{margin-top:4px;padding-top:4px}
  .tree-note{top:70px}
  .specimen-caption{bottom:42px}
  .specimen-caption p,.specimen-caption button{margin-top:2px}
}
