:root{font-family:system-ui,-apple-system,"Segoe UI","Yu Gothic",sans-serif;color:#233c2c;background:#d9e6da;font-size:16px;color-scheme:light}
*{box-sizing:border-box}
body{margin:0;overflow:hidden}
button,input,select,textarea{font:inherit}
button,select,textarea{font-size:.875rem;color:#304a35;border:1px solid #bbcbb4;border-radius:10px;background:#fbfdf7;min-height:44px}
button{padding:9px 13px;cursor:pointer;white-space:nowrap}
select{padding:9px 26px 9px 10px;max-width:100%}
textarea{padding:10px 12px;resize:vertical;line-height:1.5;min-width:0;max-height:110px;font-size:1rem}
button:hover,select:hover{border-color:#6e8b62;background:#fff}
button:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #728e57;outline-offset:3px}
button[aria-pressed="true"],button[aria-expanded="true"],button[type="submit"]{background:#3c5d40;color:#fff;border-color:#3c5d40}
button:disabled,select:disabled{opacity:.5;cursor:wait}
[hidden]{display:none!important}
#app{height:100dvh;display:grid;grid-template-rows:minmax(0,1fr) auto}
#stage{position:relative;min-height:0;min-width:0;overflow:hidden;isolation:isolate}
canvas{display:block;width:100%;height:100%;touch-action:none}
.heading{position:absolute;top:20px;left:22px;margin-right:16px;padding:12px 17px;background:#f8fbf0df;border:1px solid #fff8;border-radius:16px;backdrop-filter:blur(12px);pointer-events:none}
h1{font-size:1.25rem;letter-spacing:.04em;margin:0 0 5px;font-weight:650}
.edition{font-size:.75rem;letter-spacing:0;margin-left:10px;font-weight:500;color:#64715c}
#activity{font-size:.875rem;line-height:1.5;margin:0;color:#42624b}
#activity::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:#82995b;margin:0 7px 2px 0}
#status{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:17px 24px;background:#f8fbf2;border:1px solid #d5e0c9;border-radius:16px;max-width:85%;text-align:center}
#hint{position:absolute;bottom:10px;left:18px;margin:0;font-size:.75rem;color:#3f593c;background:#f8fbf0ca;padding:4px 9px;border-radius:7px;pointer-events:none}
#control-area{background:#f2f7eaf5;border-top:1px solid #becbb2;padding:0 16px env(safe-area-inset-bottom);box-shadow:0 -5px 20px #263e300a}
.toolbar{display:flex;align-items:center;justify-content:center;gap:8px;padding:10px 0;max-width:920px;margin:auto}
.toolbar-divider{height:25px;border-left:1px solid #c4d0ba;margin:0 3px}
.panel{max-width:860px;margin:0 auto;padding:14px 4px 7px;max-height:min(54dvh,440px);overflow:auto;overscroll-behavior:contain}
.field{display:flex;align-items:center;gap:10px;font-size:.875rem}
.secondary{font-size:.75rem;line-height:1.65;color:#586b4d;margin:7px 0 0}
.chat-heading,.chat-options,.view-options{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.chat-heading{justify-content:space-between;margin-bottom:10px}
.chat-heading strong{font-size:1rem}.chat-heading .secondary{margin:0}
.chat-options{gap:12px}
#conversation-log{margin:12px 0 8px;max-height:145px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;line-height:1.6}
.empty-message{margin:8px 0;color:#64715c;font-size:.875rem}
.message{padding:8px 11px;margin:5px 0;border-radius:10px;background:#e1ecd7;max-width:93%;overflow-wrap:anywhere}
.message.user{background:#fff;margin-left:auto}
.message .speaker{font-size:.75rem;color:#59704e;display:block}
.message p{font-size:.875rem;margin:2px 0}.message .chirps{font-size:.75rem;color:#536b46}
.suggestions{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}.suggestions button{font-size:.75rem;min-height:32px;padding:5px 9px;border-radius:20px;background:transparent}
#chat-form>label{font-size:.875rem;display:block;margin-bottom:5px}
.compose{display:flex;align-items:flex-end;gap:8px}.compose textarea{flex:1}.compose button{flex-shrink:0}
#bird-caption{max-width:860px;margin:0 auto;padding:8px 4px 0;display:flex;align-items:baseline;gap:9px;flex-wrap:wrap;line-height:1.4}
.caption-label,#caption-chirps{font-size:.75rem;color:#60724e}#caption-text{font-size:.875rem}
details{font-size:.75rem;line-height:1.7;margin-top:12px;color:#526748}summary{cursor:pointer}details p{margin:7px 0}a{color:inherit}
@media(min-width:1000px){.chat-options{float:right;margin:0 0 10px 18px;max-width:430px}#conversation-log{min-height:58px}.panel{max-height:360px}}
@media(max-width:580px){.heading{top:12px;left:12px;padding:10px 13px}h1{font-size:1.125rem}#hint{font-size:.75rem;left:12px;bottom:8px;max-width:calc(100% - 24px)}#control-area{padding-left:10px;padding-right:10px}.toolbar{gap:5px;justify-content:space-between}.toolbar button{padding:8px 9px;font-size:.875rem}.toolbar-divider{margin:0}.panel{padding-top:11px;max-height:55dvh}.chat-options{gap:8px;align-items:stretch}.chat-options .field{flex:1;flex-direction:column;gap:4px;align-items:stretch}.chat-heading{gap:2px;display:block}.chat-heading .secondary{display:block}#conversation-log{max-height:105px}.compose{gap:5px;flex-wrap:wrap}.compose textarea{flex-basis:62%}.compose button{padding:8px 10px}.view-options{gap:8px}#bird-caption{gap:4px 8px}.caption-label{display:none}}
@media(max-width:580px){.toolbar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}.toolbar-divider{display:none}.toolbar button{padding:8px 4px;min-width:0}}
@media(max-width:320px){.toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-height:480px) and (min-width:600px){#app:has(.panel:not([hidden])){grid-template-columns:minmax(0,1fr) min(390px,48vw);grid-template-rows:1fr}#control-area{min-height:0;overflow:auto}#app:has(.panel:not([hidden])) .toolbar{flex-wrap:wrap}#app:has(.panel:not([hidden])) .panel{max-height:none}.heading{top:10px;left:10px;padding:8px 11px}h1{font-size:1rem}.edition,#hint{display:none}.chat-options .field{gap:5px;font-size:.875rem}#conversation-log{max-height:85px}}

.life-options{display:flex;flex-wrap:wrap;align-items:center;gap:16px 24px;margin:12px 0}.life-options p{margin:4px 0;font-size:.875rem}.life-options strong{font-size:.875rem}#day-label{display:block;margin-top:3px}#gesture-panel{display:flex;flex-wrap:wrap;align-items:end;gap:10px 18px}#interaction-status{flex-basis:100%;margin:0}
.climate-options{display:flex;gap:14px 24px;flex-wrap:wrap;margin-top:16px;padding-top:14px;border-top:1px solid #d2ddc9}.climate-options .field{flex:1}.climate-options select{flex:1;min-width:0}.view-options .field{flex:1}.view-options select{min-width:0;flex:1}#camera-status{min-height:1.6em}
@media(max-width:430px){.climate-options{gap:10px}.climate-options .field{flex-direction:column;align-items:stretch;gap:5px}.view-options .field{flex-basis:100%}.life-options{gap:12px}.life-options>.field{flex-basis:100%}.life-options select{flex:1;min-width:0}}

#take-photo{position:absolute;right:18px;bottom:48px;background:#fbfdf2ed;box-shadow:0 3px 12px #233c2c20;min-width:78px}
#purchase-card{padding:14px;border:1px solid #c4d2b6;border-radius:14px;background:#e8efdc;margin:10px 0 15px}#purchase-card>p{font-size:.875rem;line-height:1.65;margin:7px 0}#purchase-card .companion-actions{margin-top:10px}
.heading{max-width:calc(100% - 32px)}#garden-title{overflow-wrap:anywhere}.edition{display:inline-block}
input{min-width:0;min-height:44px;padding:9px 11px;border:1px solid #bbcbb4;border-radius:10px;background:#fff;color:#304a35;font-size:1rem}input:focus-visible{outline:3px solid #728e57;outline-offset:3px}
#name-form>label{font-size:.875rem;display:block;margin:8px 0 5px}.name-compose,.companion-actions{display:flex;gap:8px;align-items:center}.name-compose input{flex:1}.companion-actions{margin-top:14px;flex-wrap:wrap}.companion-actions button{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.decor-options{display:flex;gap:12px 20px;align-items:center;flex-wrap:wrap;border-top:1px solid #d2ddc9;margin-top:14px;padding:14px 0}.decor-options>strong,.decor-options>p{flex-basis:100%;margin:0}.decor-options>strong{font-size:.875rem}.decor-options .field{flex:1}.decor-options select{min-width:0;flex:1}
dialog{width:min(900px,calc(100vw - 24px));max-height:88dvh;border:1px solid #c6d2bb;border-radius:20px;background:#f6f7ef;color:#304a35;padding:20px;box-shadow:0 20px 80px #14261955;overscroll-behavior:contain}dialog::backdrop{background:#1b30296b;backdrop-filter:blur(4px)}
.album-heading{display:flex;gap:12px;align-items:center;justify-content:space-between}.album-heading h2{font-size:1.1rem;margin:0}.album-heading button{flex-shrink:0}#album-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px;margin:16px 0}.photo-card{background:#fff;padding:8px;border:1px solid #dee4d5;border-radius:12px;min-width:0}.photo-card img{width:100%;height:200px;object-fit:contain;background:#edf0e5;border-radius:5px}.photo-card p,#latest-photo p{font-size:.75rem;line-height:1.6;overflow-wrap:anywhere}.photo-actions{display:flex;gap:6px;flex-wrap:wrap}.photo-actions button{font-size:.75rem;padding:8px}.album-empty{padding:30px 14px;background:#e9efdf;border-radius:12px;font-size:.875rem;line-height:1.7}#latest-photo{margin-top:16px;padding:12px;border:1px solid #c6d5b4;border-radius:12px;text-align:center}#latest-photo img{max-width:100%;height:220px;object-fit:contain}#photo-status{margin:12px 0}#undo-photo{margin-top:8px}
@media(max-width:580px){.toolbar{grid-template-columns:repeat(3,minmax(0,1fr));padding:7px 0}.toolbar button{padding:7px 4px}.decor-options{gap:10px}.decor-options .field{flex-basis:100%}#take-photo{right:12px;bottom:52px;min-width:72px}.panel{max-height:48dvh}dialog{padding:14px}.name-compose{flex-wrap:wrap}.name-compose input{width:130px}.album-heading h2{font-size:1rem}#album-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.photo-card img{height:150px}.photo-actions button{width:100%}.heading{max-width:calc(100% - 24px)}}

/* Keep the garden visible while the controls are open, including on small phones. */
.toolbar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));max-width:600px;gap:6px;padding:8px 0}
.toolbar button{min-height:48px;white-space:normal;padding:8px 10px;font-size:.875rem;line-height:1.3;border-color:transparent;background:transparent}
.toolbar button[aria-expanded="true"]{background:#31583e;border-color:#31583e;color:white;box-shadow:0 3px 10px #24432b18}
.scene-actions{position:absolute;left:18px;bottom:49px;display:flex;gap:7px}
.scene-actions button{min-width:62px;background:#fbfdf2ed;backdrop-filter:blur(10px);box-shadow:0 3px 12px #233c2c16}
.scene-actions button[aria-pressed="true"]{background:#31583eed;color:white}
#take-photo{bottom:49px;min-height:46px}
.heading{padding:10px 14px;max-width:min(410px,calc(100% - 30px))}
.panel-open .heading{padding:6px 10px;top:10px;left:12px;border-radius:9px}
.panel-open .heading h1,.panel-open #day-label,.panel-open #hint{display:none}
.panel-open .scene-actions,.panel-open #take-photo{bottom:12px}
.panel{max-height:min(42dvh,360px);scrollbar-width:thin;padding-top:12px;padding-bottom:10px}
.secondary,details,.suggestions button,.photo-actions button{font-size:.875rem}
.chat-heading{margin-bottom:6px}
.chat-tuning{margin:4px 0 8px;border-bottom:1px solid #d7e1d1}
.chat-tuning>summary{min-height:40px;padding:8px 0;font-size:.875rem}
.chat-tuning .chat-options{float:none;max-width:none;margin:4px 0 10px}
.suggestions button{min-height:40px;padding:7px 11px}
.language-options{padding-top:10px;margin-top:10px;border-top:1px solid #d7e1d1}
#discovery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0 24px}
.discovery-card{position:relative;padding:18px 14px 12px;border:1px solid #dae0d5;border-radius:14px;background:#edf0e7}
.discovery-card.discovered{border-color:#a6bea1;background:#fff}
.discovery-icon{display:block;font-size:1.6rem;color:#758b6a;line-height:1;margin-bottom:10px}
.discovered .discovery-icon{color:#3d694a}
.discovery-card h3{font-size:1rem;margin:0 0 7px;line-height:1.4}
.discovery-card p{font-size:.875rem;line-height:1.55;margin:5px 0;color:#56684e}
.discovery-date{padding-top:7px;border-top:1px solid #dbe4d4}
#diary-title{font-size:1rem;margin-bottom:10px}
#diary-list{padding:0;list-style:none;max-height:260px;overflow:auto}
#diary-list li{display:flex;gap:16px;padding:10px 2px;border-bottom:1px solid #d9e2d2;font-size:.875rem}
#diary-list time{color:#68765d;min-width:72px}
@media(max-width:580px){
  .toolbar{grid-template-columns:repeat(4,minmax(0,1fr));padding:6px 0;gap:4px}.toolbar button{padding:7px 4px;font-size:.875rem}
  .scene-actions{left:12px;bottom:56px}.scene-actions button{font-size:.875rem;padding:8px 10px}
  #take-photo{bottom:56px}.heading{padding:9px 12px}h1{font-size:1rem}.edition{font-size:.75rem}
  .panel{max-height:40dvh}.panel-open #stage{min-height:120px}.chat-heading .secondary{font-size:.75rem}
  #conversation-log{max-height:120px;margin:8px 0}.chat-options .field{min-width:130px}
  #discovery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.discovery-card{padding:14px 11px}
  #bird-caption{padding-top:7px;padding-bottom:3px}.compose textarea{min-height:44px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important}}

/* Quiet garden controls: tactile actions, short labels, room for the bird. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.heading{background:#f8fbf0c9;border-color:#fff9;box-shadow:0 3px 16px #213e2510}
.heading h1{font-size:1rem;letter-spacing:.015em}.heading #day-label{font-size:.75rem}
.scene-actions,.panel-open .scene-actions{bottom:18px;gap:8px}
#take-photo,.panel-open #take-photo{bottom:18px;display:flex;align-items:center;justify-content:center;gap:7px}
.scene-actions button{display:flex;gap:7px;align-items:center;min-height:46px;border-radius:15px}
.toolbar{gap:8px;padding:7px 0}.toolbar button{display:flex;flex-direction:column;gap:3px;align-items:center;justify-content:center;border-radius:16px;min-height:59px}
.toolbar svg{width:22px;height:22px}.toolbar button[aria-expanded="true"]{box-shadow:0 3px 12px #24432b1a}
#control-area{border-radius:22px 22px 0 0;border-top-color:#ffffffa6;padding-left:16px;padding-right:16px}
#gesture-panel{display:block}
.gesture-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;width:100%}
.gesture-grid button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:82px;border-radius:16px;background:#fffefa;border-color:#d1dccc;white-space:normal;line-height:1.3;box-shadow:0 2px 4px #2d492009}
.gesture-grid svg{width:28px;height:28px;color:#416950}.gesture-grid button:active{background:#dcebd9;transform:scale(.97)}
.touch-tools{display:flex;align-items:center;gap:12px;margin:14px 0 6px;font-size:.875rem}.touch-tools>div{display:flex;flex:1;gap:4px;background:#e4ebdd;border-radius:13px;padding:4px}.touch-tools button{flex:1;padding:7px 9px;min-height:42px;border-color:transparent;background:transparent}.touch-tools button[aria-pressed="true"]{background:#fffefa;color:#31583e;box-shadow:0 2px 6px #233c2c16}
.more-actions{margin-top:8px}.more-actions summary{min-height:44px;display:flex;align-items:center;gap:8px}.more-actions summary::after{content:'+';margin-left:auto}.more-actions[open] summary::after{content:'−'}.more-actions select{width:100%;margin-bottom:8px}
.feedback:empty,#storage-status:empty,#decor-status:empty,#chat-status:empty{display:none}
.feedback{padding:7px 0;color:#42624b}.chat-heading{margin-bottom:8px}.chat-heading .secondary{font-size:.75rem}.chat-tuning{border-bottom:0;margin:0}.chat-tuning>summary{padding:5px 0;min-height:38px}
#conversation-log:empty{display:none}#chat-form>label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#name-help{margin-top:4px;font-size:.75rem}.companion-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.companion-actions button{min-height:56px;border-radius:14px;padding:9px;white-space:normal}
#purchase-card .companion-actions{display:flex}#purchase-card .companion-actions button{min-height:44px}
#journal-help:empty{display:none}.discovery-card.discovered>p:not(.discovery-date){display:none}
@media(max-width:580px){.gesture-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.gesture-grid button{min-height:73px;padding:9px 5px}.gesture-grid svg{width:25px;height:25px}.scene-actions,.panel-open .scene-actions,#take-photo,.panel-open #take-photo{bottom:14px}.toolbar{padding:5px 0}.toolbar button{min-height:57px;padding:6px 3px;font-size:.875rem}.panel{max-height:43dvh;padding:12px 0 8px}.touch-tools{gap:8px}.companion-actions{gap:7px}.companion-actions button{font-size:.875rem}.heading{top:14px;left:12px}}
#automatic::before{content:"";width:19px;height:19px;flex-shrink:0;background:currentColor;mask:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M20%207A9%209%200%200%200%204%207m0%200V2m0%205h5M4%2017a9%209%200%200%200%2016%200m0%200v5m0-5h-5%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat}
#sound::before{content:"";width:19px;height:19px;flex-shrink:0;background:currentColor;mask:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2010h4l5-5v14l-5-5H3Zm13-2a6%206%200%200%201%200%208m3-11a10%2010%200%200%201%200%2014%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat}
#take-photo::before{content:"";width:19px;height:19px;flex-shrink:0;background:currentColor;mask:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%207h4l2-3h6l2%203h4v13H3Z%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2213%22%20r%3D%224%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat}

#surface-feedback{position:absolute;left:50%;bottom:82px;transform:translateX(-50%);background:#203e30ec;color:#fff;padding:9px 16px;border-radius:24px;font-size:.875rem;max-width:80%;text-align:center;pointer-events:none;box-shadow:0 4px 16px #172d2826}

/* Once purchased, keep only the current billing status and restore control. */
#purchase-card.is-premium{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:8px 10px;margin:8px 0;background:transparent}
#purchase-card.is-premium>strong,#purchase-card.is-premium>p:not(#purchase-status){display:none}
#purchase-card.is-premium .companion-actions{grid-column:2;grid-row:1;margin:0}
#purchase-card.is-premium #purchase-status{grid-column:1;grid-row:1;margin:0;font-size:.875rem;line-height:1.45;overflow-wrap:anywhere}
