/* The tree workspace is sized by the viewport, never by a tall image. */
[hidden]{display:none!important}
.garden-template-empty{grid-column:1/-1;width:100%;text-align:center}.garden-template-empty>header{margin:0 0 22px}.garden-template-empty>header h2{font-size:24px;margin:8px 0}.garden-template-empty>header p{font-size:13px;color:var(--muted);margin:0}.garden-templates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.garden-template-card{overflow:hidden;border:1px solid #d7dcc7;border-radius:22px;background:#fffdf5;box-shadow:0 7px 20px #6c765111;transition:translate .2s}.garden-template-card:hover{translate:0 -4px}.garden-template-card>img{width:100%;height:auto;display:block;aspect-ratio:1.45;object-fit:cover}.garden-template-card>div{padding:14px 15px 20px}.garden-template-card h3{font-size:20px;margin:0 0 5px}.garden-template-card p{font-size:12px;line-height:1.6;color:var(--muted);margin:0 0 14px}.garden-template-card[data-template=reach]{border-color:#e7cdbb;background:#fff8ed}.garden-template-card[data-template=dream]{border-color:#e2d2e7;background:#fcf6ff}
@media(max-width:800px){.garden-templates{gap:12px}.garden-template-card h3{font-size:16px}.garden-template-card>div{padding:12px 8px 16px}.garden-template-card p{font-size:10px}.garden-template-empty>header h2{font-size:21px}}
@media(max-width:540px){.garden-templates{grid-template-columns:1fr;gap:18px}.garden-template-card>img{aspect-ratio:1.6}.garden-template-card h3{font-size:21px}.garden-template-card p{font-size:12px}}

.garden-tree-page{height:100vh;height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column}.garden-tree-page>.garden-nav{height:60px;min-height:60px;flex:0 0 60px;width:100%;max-width:1600px;padding:0 28px}.garden-tree-page .garden-brand img{width:37px;height:37px}.garden-tree-page .garden-brand{font-size:17px}.garden-tree-page>main{flex:1;min-height:0;display:flex;flex-direction:column}.garden-tree-page .garden-notice{display:none}.garden-tree-page .tree-page{width:min(1600px,100%);max-width:none;min-height:0;flex:1;display:grid;grid-template-rows:auto minmax(0,1fr) auto;margin:0 auto;padding:10px 24px 12px;gap:10px}.tree-top{display:flex;align-items:center;justify-content:space-between;gap:20px;min-width:0}.garden-tree-page .tree-heading{margin:0;text-align:left;min-width:0;flex:1;max-width:850px;overflow:hidden}.garden-tree-page .tree-heading h1{font-size:clamp(20px,2vw,29px);margin:3px 0;line-height:1.3;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.garden-tree-page .tree-heading p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:1.6;margin:0;color:var(--muted)}.garden-tree-page .garden-eyebrow{font-size:8px;letter-spacing:2px}.tree-top .tree-toolbar-right{flex-shrink:0;max-width:500px;gap:8px}.tree-top .volume-control{display:flex;flex-direction:column;gap:0;font-size:8px}.tree-top .volume-control input{width:65px}.garden-stage{position:relative;min-height:0;overflow:hidden;border:1px solid #d4dec7;border-radius:28px;background:radial-gradient(ellipse at 20% 5%,#fffcda60,transparent 50%),linear-gradient(#daedf6 0,#f2f5df 70%,#dce7be 100%);isolation:isolate}.garden-stage[data-template=reach]{background:linear-gradient(#f5dccb,#fce9cf 65%,#e6d3ae)}.garden-stage[data-template=dream]{background:linear-gradient(#e5e5f6,#f5e8f0 65%,#dfe5d3)}.scene-viewport{position:absolute;inset:0;z-index:1;outline-offset:-5px}.scene-viewport canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab}.stage-hills{position:absolute;bottom:-20%;left:-10%;width:120%;height:50%;border-radius:50% 80% 0 0;background:#aabd8d35;box-shadow:0 -18px 0 #b4c7a32b;pointer-events:none}.scene-hint{position:absolute;bottom:10px;left:50%;translate:-50% 0;margin:0;z-index:2;pointer-events:none;font-size:10px;white-space:nowrap;color:#637159;background:#fffdf1b8;border:1px solid #e5e7d0a0;padding:5px 14px;border-radius:99px;backdrop-filter:blur(4px)}.scene-loading{position:absolute;inset:0;display:grid;place-content:center;font-family:Mali,cursive;font-size:17px;color:var(--green);margin:0}.garden-stage .scene-sun,.garden-stage .scene-moon{width:58px;height:58px;right:9%;top:9%}.garden-stage .scene-moon:after{width:53px;height:53px}.garden-stage .scene-stars{z-index:0}.garden-stage .fireflies{z-index:2}.garden-stage .scene-cloud{z-index:0;opacity:.7}.tree-dashboard{min-width:0}.tree-action-row{display:flex;gap:20px;align-items:center}.tree-action-row>#add-card{min-height:43px;padding:10px 23px;font-size:14px}.tree-action-row>strong{font-family:Mali,cursive;font-size:18px;white-space:nowrap}.scene-controls{display:flex;gap:7px;align-items:center;margin-left:auto;min-width:0;flex-wrap:wrap;justify-content:flex-end}.scene-controls .garden-button{min-height:35px;padding:6px 12px;font-size:12px}.garden-tree-page .tree-status{max-width:none;font-size:11px;margin:6px 0 0;line-height:1.6;min-height:18px;text-align:center}.garden-tree-page .tree-status.is-full{background:none;border:0;border-radius:0;padding:0;color:#926c53}.garden-tree-page .music-status{min-height:0;margin:0;font-size:10px;line-height:1.5}.garden-tree-page .music-status:empty{display:none}.card-tooltip{position:absolute;z-index:5;max-width:min(280px,calc(100% - 16px));padding:8px 14px;border-radius:14px;border:1px solid #ddc9ac;background:#fffdf5f5;color:#5a493a;font-size:12px;line-height:1.5;overflow-wrap:anywhere;box-shadow:0 4px 16px #42381919;pointer-events:none}.scene-fallback{position:absolute;inset:0;z-index:4;padding:25px;overflow:auto;background:var(--paper);text-align:center}.scene-fallback h2{margin:0}.scene-fallback p{color:var(--muted);font-size:13px}.scene-fallback #fallback-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-top:20px}.scene-fallback button.card-list-entry{width:100%;text-align:left}
.paper-surface{fill:var(--card-fill,#efb1c6);stroke:var(--card-edge,#bd91a2);stroke-width:.7}.paper-detail{fill:none;stroke:var(--card-edge,#bd91a2);stroke-width:.65;opacity:.5}.paper-hole{fill:#ae8c62;opacity:.65}.card-shape-field{border:0;padding:0;margin:18px 0 0}.card-shape-field legend{font-size:14px;margin-bottom:12px}.card-shapes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.card-shapes label{position:relative;cursor:pointer}.card-shapes input{position:absolute;opacity:0;inset:0;margin:0;width:100%;height:100%}.card-shapes label>span{display:flex;flex-direction:column;align-items:center;border:1px solid var(--border);border-radius:15px;padding:10px;background:#fcf7ed}.card-shapes input:checked+span{outline:2px solid #8aa076;outline-offset:1px;background:#f2f4e4}.card-shapes input:focus-visible+span{outline:3px solid #a78080}.card-shapes svg{width:60px;height:48px;filter:drop-shadow(0 3px 2px #ac8c5d20)}.card-shapes strong{font-size:11px;font-weight:500;color:#695a4a;margin-top:5px}.card-preview{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:15px;background:linear-gradient(120deg,#f9f3df,#f9e7e9);padding:8px 22px;border:1px solid #e8ddc6;border-radius:16px;font-size:12px;color:#8c7866}.card-preview svg{width:92px;height:74px;filter:drop-shadow(0 3px 2px #ac8c5d30)}.card-colors svg{height:35px!important}.garden-dialog.read-dialog{background:transparent!important;border:0;border-radius:0;padding:0;overflow:visible;box-shadow:none;width:min(650px,calc(100% - 26px));max-height:94dvh;color:#534b3d}.letter-paper{position:relative;padding:75px 90px 68px;filter:drop-shadow(0 15px 20px #29231733)}.letter-shape{position:absolute;inset:0;z-index:-1;pointer-events:none}.letter-shape>span,.letter-shape svg{display:block;width:100%;height:100%}.letter-shape .paper-detail,.letter-shape .paper-hole{opacity:.25}.letter-shape .paper-surface{stroke-width:.4}.letter-cord{position:absolute;left:50%;top:15px;width:12px;height:49px;border:3px solid #b99b68;border-radius:50%;rotate:14deg;box-shadow:inset 1px 0 #ede0b6}.read-dialog[data-shape=star] .letter-paper{padding:120px 145px 100px}.read-dialog[data-shape=star] .letter-cord{top:15px}.read-dialog .dialog-close{right:30px;top:35px}.read-dialog[data-shape=star] .dialog-close{right:90px;top:90px}.garden-dialog.read-dialog h2{font-size:20px;line-height:1.5;margin:12px 0 8px}.read-dialog .letter-message{font-size:16px;line-height:1.9;max-height:30dvh;overflow:auto;padding:4px 8px}.read-dialog[data-shape=star] .letter-message{max-height:24dvh}.read-dialog .letter-signoff{font-size:14px;margin:14px 0 8px;line-height:1.65}.cards-dialog{width:min(850px,calc(100% - 24px));max-height:90dvh}.cards-dialog>input{margin:18px 0 8px;border:1px solid var(--border);border-radius:12px;padding:12px;color:var(--ink);background:var(--paper);width:100%}.cards-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}.card-list-entry{display:flex;gap:12px;align-items:flex-start;min-width:0;border:1px solid var(--border);background:var(--paper);color:var(--ink);padding:14px;border-radius:15px;cursor:pointer;text-align:left;font-size:12px;line-height:1.8}.card-list-entry>span:last-child{min-width:0;overflow-wrap:anywhere}.card-list-entry strong{display:block;font-weight:600}.card-list-entry p{font-size:11px;line-height:1.8;color:var(--muted);margin:4px 0 0}.card-list-icon{font-size:25px;color:var(--card-edge);line-height:1.4}.garden-grid .tree-thumbnail{aspect-ratio:1.3;background:#e9eddd}.garden-grid .tree-thumbnail img{object-fit:cover}.thumbnail-leaves{display:none}.template-option img{aspect-ratio:1.3;object-fit:cover;border-radius:12px}.template-option strong{margin-top:9px}.template-option>span{padding:9px}.template-option input:checked+span{padding:8px}.garden-intro{padding-top:45px;padding-bottom:28px}.garden-intro h1{font-size:clamp(28px,3.5vw,42px)}
html[data-garden-mode=night] .garden-stage{background:radial-gradient(ellipse at 75% 10%,#8d7f9a25,transparent 50%),linear-gradient(#263453,#42476b 65%,#4e665a);border-color:#68726b}html[data-garden-mode=night] .scene-hint{background:#273548c9;border-color:#63756660;color:#dae2ca}html[data-garden-mode=night] .card-list-entry{background:#2b3c48}html[data-garden-mode=night] .card-shapes label>span{background:#35454e}html[data-garden-mode=night] .card-shapes strong{color:#d2d9cb}html[data-garden-mode=night] .garden-tree-page .tree-status.is-full{color:#e4c5a0}
@media(max-width:1100px){.tree-top{gap:12px}.tree-top .tree-toolbar-right{max-width:370px;gap:6px}.tree-action-row{gap:12px}.tree-action-row>#add-card{font-size:12px;padding:10px 16px}.tree-action-row>strong{font-size:16px}.scene-controls .garden-button{font-size:11px;padding:6px 10px}.garden-tree-page .tree-page{padding-inline:16px}.garden-stage{border-radius:23px}}
@media(max-width:800px){.garden-tree-page>.garden-nav{padding:0 18px}.garden-tree-page .garden-brand span{display:none}.tree-top{flex-direction:column;align-items:stretch;gap:8px}.garden-tree-page .tree-heading{text-align:center;max-width:none}.garden-tree-page .tree-heading p{-webkit-line-clamp:1;font-size:11px}.tree-top .tree-toolbar-right{justify-content:center;max-width:none;gap:8px}.tree-top .volume-control{flex-direction:row;gap:5px}.tree-top .garden-button{min-height:30px;font-size:11px;padding:5px 12px}.tree-action-row{flex-wrap:wrap;justify-content:center;gap:10px}.scene-controls{width:100%;margin:0;justify-content:center;gap:7px}.scene-controls .garden-button{min-height:32px;font-size:11px;padding:6px 11px}.garden-tree-page .tree-page{padding:7px 12px 10px;gap:8px}.tree-heading h1{font-size:23px!important}.scene-hint{font-size:9px;padding:4px 10px;bottom:7px}.garden-tree-page .tree-status{font-size:10px;margin-top:5px}.garden-stage .scene-sun,.garden-stage .scene-moon{width:42px;height:42px}.garden-stage .scene-moon:after{width:38px;height:38px}.read-dialog[data-shape=star] .letter-paper{padding:105px 130px 90px}}
@media(max-width:520px){.garden-tree-page>.garden-nav{height:52px;min-height:52px;flex:0 0 52px;flex-wrap:nowrap;gap:8px;padding:0 14px;justify-content:space-between}.garden-tree-page .garden-brand{font-size:14px;gap:7px}.garden-tree-page .garden-brand img{width:28px;height:28px}.garden-tree-page .garden-nav nav{font-size:10px;gap:12px}.garden-tree-page .garden-nav nav>a:first-child{display:none}.garden-tree-page .tree-page{padding:6px 8px 8px;gap:6px}.garden-tree-page .tree-heading h1{font-size:20px!important;margin:2px 0}.garden-tree-page .tree-heading .garden-eyebrow{font-size:7px;letter-spacing:1.2px}.tree-top{gap:6px}.tree-top .tree-toolbar-right{gap:5px}.tree-top .garden-button{padding:5px 9px;font-size:10px;min-height:28px}.tree-top .volume-control{font-size:0}.tree-top .volume-control input{width:45px}.tree-action-row>#add-card{font-size:12px;padding:8px 15px;min-height:38px}.tree-action-row>strong{font-size:15px}.tree-action-row{gap:6px 14px}.scene-controls{gap:5px;flex-wrap:nowrap}.scene-controls .garden-button{font-size:10px;padding:5px 8px;min-height:30px}.scene-controls #zoom-reset span{display:none}.garden-stage{border-radius:20px}.scene-hint{font-size:8px;letter-spacing:0;padding:4px 8px;max-width:calc(100% - 18px)}.card-tooltip{font-size:10px;padding:6px 10px}.cards-list{grid-template-columns:1fr}.cards-dialog h2{font-size:18px}.card-shapes{gap:8px}.card-shapes label>span{padding:7px 3px}.card-shapes svg{width:48px;height:42px}.card-shapes strong{font-size:10px}.card-preview{font-size:11px;padding:8px 15px}.garden-dialog.read-dialog{width:calc(100% - 26px);overflow:visible}.read-dialog .letter-paper,.read-dialog[data-shape=star] .letter-paper{padding:45px 29px 32px;max-height:90dvh;border-radius:32px;background:var(--card-fill)}.read-dialog .letter-shape{opacity:.19;z-index:0;border-radius:32px;overflow:hidden}.read-dialog .leaf-letter{z-index:1}.read-dialog .letter-cord,.read-dialog[data-shape=star] .letter-cord{top:-13px;z-index:2;height:36px}.read-dialog .dialog-close,.read-dialog[data-shape=star] .dialog-close{right:10px;top:10px}.read-dialog .letter-message,.read-dialog[data-shape=star] .letter-message{max-height:43dvh;font-size:15px;padding:4px 2px}.read-dialog .leaf-letter:before{content:'✉';display:block;font-size:37px;color:var(--card-edge);line-height:1;margin-bottom:12px}.read-dialog[data-shape=star] .leaf-letter:before{content:'★'}.read-dialog[data-shape=cloud] .leaf-letter:before{content:'☁'}.read-dialog .leaf-letter h2{font-size:18px;margin-top:8px}.garden-grid{grid-template-columns:1fr}.template-grid{gap:8px}.template-option>span{padding:5px}.template-option input:checked+span{padding:4px}.template-option strong{font-size:10px}.scene-fallback{padding:18px}.scene-fallback h2{font-size:20px}}
@media(max-height:620px) and (min-width:801px){.garden-tree-page>.garden-nav{height:48px;min-height:48px;flex-basis:48px}.garden-tree-page .tree-page{gap:6px;padding-top:6px;padding-bottom:6px}.garden-tree-page .tree-heading h1{font-size:22px}.garden-tree-page .tree-heading .garden-eyebrow{display:none}.garden-tree-page .tree-heading p{-webkit-line-clamp:1}.scene-hint{bottom:6px}.tree-action-row>#add-card{min-height:34px;padding-block:6px}.garden-tree-page .tree-status{font-size:10px;margin-top:3px}}
@media(prefers-reduced-motion:reduce){.garden-stage *{animation:none!important;transition:none!important}}
@media(orientation:landscape) and (max-height:500px){.garden-tree-page>.garden-nav{height:42px;min-height:42px;flex-basis:42px}.garden-tree-page .tree-page{padding:4px 12px;gap:4px}.tree-top{flex-direction:row;gap:10px}.garden-tree-page .tree-heading .garden-eyebrow,.garden-tree-page .tree-heading p{display:none}.garden-tree-page .tree-heading h1{font-size:18px!important;text-align:left}.tree-top .tree-toolbar-right{flex-wrap:nowrap;gap:4px}.tree-top .garden-button{font-size:9px;padding:4px 8px;min-height:27px}.tree-top .volume-control{font-size:0}.tree-top .volume-control input{width:40px}.tree-action-row{flex-wrap:nowrap;gap:10px}.scene-controls{width:auto;margin-left:auto;flex-wrap:nowrap;gap:4px}.scene-controls .garden-button{font-size:9px;min-height:28px;padding:4px 8px}.tree-action-row>#add-card{font-size:10px;min-height:30px;padding:5px 12px}.tree-action-row>strong{font-size:13px}.garden-tree-page .tree-status{font-size:9px;margin-top:2px}.scene-hint{font-size:8px;padding:3px 8px;bottom:4px}}

@media(min-width:801px) and (min-height:701px){.read-dialog[data-shape=star]{width:min(750px,calc(100% - 26px))}.read-dialog[data-shape=star] .letter-paper{padding:145px 190px 130px}.read-dialog[data-shape=star] .leaf-letter h2{font-size:18px;max-width:250px;margin-inline:auto}.read-dialog[data-shape=star] .letter-message{font-size:15px;max-height:18dvh}}
.read-dialog .leaf-letter{max-width:390px;margin-inline:auto}.read-dialog[data-shape=star] .leaf-letter h2{max-width:250px;margin-inline:auto}
@media(max-height:700px) and (min-width:521px){.read-dialog[data-shape=star]{width:min(560px,calc(100% - 26px))}.read-dialog[data-shape=star] .letter-paper{padding:42px 32px 27px;background:var(--card-fill);border-radius:28px;max-height:90dvh}.read-dialog[data-shape=star] .letter-shape{opacity:.18;z-index:0;overflow:hidden;border-radius:28px}.read-dialog[data-shape=star] .leaf-letter{z-index:1}.read-dialog[data-shape=star] .leaf-letter:before{content:'★';display:block;color:var(--card-edge);font-size:28px;line-height:1;margin-bottom:8px}.read-dialog[data-shape=star] .letter-message{max-height:30dvh}.read-dialog[data-shape=star] .dialog-close{right:10px;top:10px}.read-dialog[data-shape=star] .letter-cord{top:-12px;z-index:2;height:36px}}
.tree-top .tree-toolbar-right { align-items: flex-end; gap: 8px; }
.tree-top .music-picker, .tree-top .volume-control { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin: 0; font-size: 9px; line-height: 12px; color: var(--muted); min-width: 0; }
.tree-top .music-picker { width: 165px; max-width: 100%; }
.music-picker > span { white-space: nowrap; }
.tree-top .tree-toolbar-right > .garden-button, .tree-top .music-picker select { box-sizing: border-box; height: 36px; min-height: 36px; }
.tree-top .tree-toolbar-right > .garden-button { display: inline-flex; align-items: center; justify-content: center; padding: 6px 12px; line-height: 1.2; white-space: nowrap; }
.music-picker select { width: 100%; min-width: 0; border: 1px solid #b8cba6; border-radius: 18px; padding: 5px 26px 5px 11px; background: #fffdf5; color: #425d35; font: 500 11px 'Be Vietnam Pro', sans-serif; cursor: pointer; }
.music-picker select:focus-visible { outline: 2px solid #749c52; outline-offset: 3px; }
.music-picker select option { background: #fffdf5; color: #425d35; }
.tree-top .volume-control input { display: block; width: 65px; height: 36px; margin: 0; padding: 0; }
html[data-garden-mode=night] .music-picker select { background: #283f42; color: #f3ecd5; border-color: #64807b; }
@media(min-width:801px) { .tree-top .tree-toolbar-right { max-width: 620px; } }
@media(max-width:800px) {
    .tree-top .music-picker { width: 150px; }
    .tree-top .tree-toolbar-right > .garden-button, .tree-top .music-picker select { height: 32px; min-height: 32px; }
    .tree-top .volume-control input { height: 32px; }
    .tree-top .music-picker, .tree-top .volume-control { gap: 3px; }
}
