/* Paper stationery surfaces share the palette of the hand-painted town. */
.depth-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 6px 12px; border-bottom: 1px solid #d2dfd6; background: #eff5f5; }
.depth-entry { display: flex; align-items: center; gap: 7px; min-height: 38px; font-size: 12px; color: #497587; }
.auto-depth-label { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #59796c; cursor: pointer; min-height: 38px; }
.auto-depth-label input { width: 18px; height: 18px; accent-color: #5b8775; }
.depth-selection { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 240px; font-size: 11px; color: #627c80; }
.depth-selection[hidden],.outing-claim[hidden] { display: none; }
#depth { flex: 1; min-width: 40px; max-width: 260px; accent-color: #668eac; height: 36px; }
#depth-value { min-width: 49px; text-align: right; font-variant-numeric: tabular-nums; }
.scene-bottom .outing-entry { min-height: 42px; min-width: 0; flex: 1; text-align: left; color: #497365; font-size: 12px; }
.outing-entry span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.outing-claim { flex-shrink: 0; min-height: 36px; padding: 5px 10px; border-radius: 4px; background: #e6eed3; color: #507138; font-size: 11px; }
.layer-list { display: grid; }
.layer-row { display: flex; align-items: center; text-align: left; gap: 14px; padding: 7px 10px; min-height: 66px; border-bottom: 1px solid #dce6df; }
.layer-row.selected { background: #e9f1df; box-shadow: inset 3px 0 #698e67; }
.layer-number { width: 28px; color: #91a394; font-variant-numeric: tabular-nums; }
.layer-row canvas { width: 52px; height: 48px; object-fit: contain; }
.layer-row>span:nth-of-type(2) { flex: 1; display: grid; gap: 5px; }
.layer-row strong { font-size: 13px; font-weight: 500; }
.layer-row small { font-size: 11px; color: #798c7b; }
.outing-intro { display: flex; gap: 20px; align-items: center; padding: 12px 0; }
.outing-intro>img { width: 76px; height: 110px; object-fit: contain; flex-shrink: 0; }
.outing-intro h3 { font-family: 'STKaiti','KaiTi',serif; font-size: 24px; margin: 10px 0; color: #52705c; }
.outing-intro p { font-size: 13px; color: #728571; line-height: 1.8; margin: 0; }
.outing-cast { display: flex; gap: 16px; justify-content: center; padding: 10px 0; border-bottom: 1px dashed #d3ddce; }
.outing-cast button { display: grid; justify-items: center; gap: 6px; width: 100px; padding: 7px; font-size: 11px; }
.outing-cast canvas { width: 76px; height: 65px; object-fit: contain; }
.outing-checklist { padding: 10px 0; }
.outing-checklist .condition { font-size: 12px; min-height: 24px; }
.outing-journeys { margin-top: 26px; display: grid; gap: 8px; }
.outing-stop { display: flex; align-items: center; gap: 14px; padding: 13px 15px; min-height: 67px; text-align: left; border: 1px solid #d7e2d2; border-radius: 5px; background: #fffef6; }
.outing-stop.active { background: #edf3e3; border-color: #a8bea0; }
.outing-stop>svg { color: #769d85; }
.outing-stop:nth-child(2)>svg { color: #779ab3; }
.outing-stop:nth-child(3)>svg { color: #ba8989; }
.outing-stop>span { flex: 1; display: grid; gap: 6px; }
.outing-stop strong { font-size: 13px; font-weight: 500; }
.outing-stop small { font-size: 11px; color: #809079; }
.outing-rewards { display: flex; justify-content: center; gap: 28px; border-top: 1px dashed #d3ddce; margin-top: 25px; padding-top: 18px; }
.outing-rewards>div { display: grid; justify-items: center; gap: 6px; font-size: 12px; }
.outing-rewards canvas { width: 95px; height: 82px; object-fit: contain; }
.outing-rewards small { font-size: 10px; color: #7f9076; }
@media (max-width: 600px) {
  .depth-bar { padding: 4px 10px; gap: 2px 12px; }
  .depth-selection { flex-basis: 100%; gap: 6px; }
  #depth { max-width: none; }
  .depth-selection .icon-button { width: 40px; height: 40px; }
  .scene-bottom .outing-entry { font-size: 10px; }
  .scene-bottom:has(.outing-claim:not([hidden])) #placed-count { display: none; }
  .outing-intro { gap: 12px; }
  .outing-intro h3 { font-size: 21px; }
  .outing-intro>img { width: 58px; height: 90px; }
  .outing-cast { gap: 8px; }
  .outing-rewards { gap: 18px; }
}
:root {
  --ink: #334d4a;
  --muted: #6a817b;
  --green: #497365;
  --blue: #557f99;
  --line: #d4e0da;
  --coral: #b76969;
  background: #eff4f0;
  color: var(--ink);
}
body { background: #eff4f0; }
button { touch-action: manipulation; }
button:focus-visible { outline-color: #b5795c; outline-width: 3px; }
.topbar {
  height: 76px; padding: 0 28px; gap: 24px;
  background: #fcfcf6; border-bottom: 1px solid #cbd9d0;
  box-shadow: 0 3px 14px #4e6c4e08;
}
.brand { gap: 10px; }
.brand-icon { width: 43px; height: 55px; border: 0; border-radius: 0; overflow: hidden; }
.brand-icon img { width: 43px; height: 62px; object-fit: contain; }
.brand strong { font-size: 27px; color: #41665b; }
.brand small { font-size: 10px; color: #718573; margin-top: 4px; }
.main-nav { align-items: center; gap: 8px; }
.nav-item { height: 44px; padding: 0 16px; font-size: 13px; border-radius: 5px; color: #698075; }
.nav-item.active { color: #416455; background: #e9efdf; box-shadow: inset 0 -2px #bacbb0; }
.nav-item.active:after { display: none; }
.notification { top: 6px; right: 6px; }
.header-tools { gap: 8px; }
.currency { border: 1px solid #d6dfc9; padding: 7px 12px; background: #f6f4e3; min-height: 40px; border-radius: 5px; color: #8a7247; }
.header-tools .icon-button { width: 40px; height: 40px; }
.workspace { max-width: 2200px; padding: 20px 24px 0; gap: 24px; grid-template-columns: minmax(0, 1fr) 258px; }
.studio { min-width: 0; }
.studio-heading { margin: 0 0 13px; }
.studio-heading h1 { font-size: 24px; margin-top: 6px; color: #486355; }
.eyebrow { font-size: 10px; color: #708776; }
.text-button { min-height: 40px; padding: 9px 13px; font-size: 12px; background: #fffef8; border-color: #cddbcc; box-shadow: 0 2px 0 #dce4d5; }
.postcard-button { border-color: #c6d7de; color: #4f768c; background: #f4f9fa; }
#save-state { color: #708576; font-size: 11px; }
.pipi-journal { gap: 12px; min-height: 0; padding: 0 0 12px; margin: 0 0 12px; }
.pipi-journal>img { width: 34px; height: 48px; }
.pipi-journal-copy { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 15px; }
.pipi-journal-copy>.eyebrow { font-size: 9px; }
.pipi-journal h2 { font-size: 17px; margin: 0; grid-column: 1; }
.pipi-journal p { font-size: 11px; line-height: 1.7; grid-column: 2; grid-row: 1 / 3; color: #6e8375; }
.pipi-journal>.text-button { border: 0; background: transparent; box-shadow: none; padding: 8px; }
.scene-shell { padding: 0; border: 1px solid #c7d9d8; border-radius: 6px 6px 0 0; background: #e0eaeb; box-shadow: 0 6px 22px #41696a12; overflow: hidden; }
.scene-top { min-height: 49px; padding: 5px 14px; background: #f4f8f4; border-bottom: 1px solid #cedcd4; }
.scene-label { min-height: 40px; font-size: 13px; gap: 8px; color: #557567; }
.scene-label svg { width: 17px; height: 17px; }
.time-control { background: #e1e9e4; padding: 3px; gap: 4px; border-radius: 5px; }
.time-control button { width: 42px; height: 34px; }
.time-control svg { width: 19px; height: 19px; }
.time-control button.active { background: #fffdf3; color: #b0834d; box-shadow: 0 2px 3px #55694a18; }
.canvas-wrap { width: 100%; height: clamp(420px, 61dvh, 850px); aspect-ratio: auto; box-shadow: none; }
#scene.panning { cursor: grab; }
#scene.panning:active { cursor: grabbing; }
.scene-bottom { min-height: 32px; padding: 0 14px; color: #5e7f7b; font-size: 11px; background: #ebf2ed; }
.scene-caption svg { width: 14px; height: 14px; }
.editor-dock { position: relative; background: #fafbf4; border: 1px solid #cedccb; border-top: 0; }
.workbench { min-height: 54px; padding: 6px 12px; border-bottom: 1px solid #d5dfce; background: #f7f9f0; flex-wrap: wrap; }
.tool-group { gap: 3px; }
.tool-group .icon-button { width: 38px; height: 38px; }
.tool-group svg { width: 19px; height: 19px; }
.icon-button.active { color: #3f6e5a; background: #e0ebda; box-shadow: inset 0 -2px #b5cbb0; }
.selected-name { color: #58735f; font-size: 12px; max-width: 120px; margin: 0 8px 0 0; }
.size-control { display: flex; align-items: center; justify-content: center; gap: 2px; border: 1px solid #cbd9c4; border-radius: 5px; background: #fffef7; padding: 0 3px; }
.size-control .icon-button { width: 30px; height: 32px; }
#scale { width: 88px; height: 30px; margin: 0 2px; accent-color: #628b72; }
.size-value { width: 45px; height: 32px; padding: 0; font-size: 11px; font-variant-numeric: tabular-nums; color: #426d55; }
.zoom-value { min-width: 42px; min-height: 38px; font-size: 11px; color: #647f77; }
.delete-tool { color: #ac7169; }
#selection-tools { display: none; }
body.has-selection #selection-tools { display: flex; }
body.has-selection .workbench { row-gap: 7px; }
body.has-selection #selection-tools { order: 3; width: 100%; border-top: 1px solid #dce4d5; padding-top: 7px; justify-content: center; }
.zoom-tools { margin-left: auto; }
.sticker-drawer { position: relative; padding: 0 16px 10px; background: #f9fbf2; isolation: isolate; }
.sticker-drawer:before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('../assets/stationery-border.png') center bottom / 100% auto no-repeat; opacity: .15; pointer-events: none; }
.drawer-heading { margin: 0; padding: 13px 0 11px; gap: 12px; }
.drawer-heading h2 { font-family: 'STKaiti','KaiTi',serif; font-size: 19px; color: #527253; gap: 8px; }
.drawer-heading h2 svg { width: 18px; }
.drawer-heading h2 span { font-family: system-ui,sans-serif; font-size: 11px; color: #6c8165; }
.filter-tabs { gap: 5px; }
.filter-tabs button { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; min-height: 34px; padding: 6px 11px; color: #6c8269; border-radius: 4px; }
.filter-tabs svg { width: 14px; height: 14px; }
.filter-tabs button.active { background: #dfeacf; box-shadow: inset 0 -2px #bacead; color: #486c42; }
.drawer-actions { display: flex; gap: 4px; align-items: center; }
.drawer-actions .icon-button { width: 34px; height: 36px; }
.gift-drawer-button { color: #ab6962; background: #fcf1eb; border: 1px solid #e7cec3; box-shadow: 0 2px 0 #ebd9cc; font-size: 11px; min-height: 34px; padding: 5px 9px; }
.gift-drawer-button svg { width: 16px; }
.sticker-tray { gap: 12px; padding: 5px 2px 13px; min-height: 136px; scroll-snap-type: x proximity; }
.sticker-card { flex-basis: 112px; height: 124px; border-color: #d6dfc9; background: #fffef7; padding: 7px 7px 10px; gap: 5px; scroll-snap-align: start; border-radius: 5px; box-shadow: 0 3px 0 #e2e7d7, 0 4px 8px #506a3e09; }
.sticker-card canvas { width: 92px; height: 86px; filter: drop-shadow(0 3px 1px #66825820); }
.sticker-card span { font-size: 11px; color: #5a7458; }
.sticker-card:before { content: ''; position: absolute; width: 30px; height: 7px; top: -3px; left: calc(50% - 15px); background: #d6e5c8b3; transform: rotate(-3deg); border: 1px solid #d0dec366; }
.sticker-card.rare:before { background: #c8dfe6c9; }
.sticker-card.hidden-rarity:before { background: #e9d7afc9; }
.sticker-card.chosen { background: #edf4e0; border-color: #779e62; box-shadow: 0 3px 0 #c2d4b0, inset 0 0 0 1px #779e62; }
.sticker-card .rarity-dot { width: 5px; height: 5px; top: 7px; right: 7px; }
.drawer-footnote { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: #7c9070; padding: 1px 0 2px; }
body.drawer-collapsed .sticker-tray, body.drawer-collapsed .drawer-footnote, body.drawer-collapsed .drawer-heading>.filter-tabs { display: none; }
body.drawer-collapsed #drawer-toggle svg { transform: rotate(180deg); }
.sidebar { padding-top: 0; }
.section-heading { min-height: 28px; margin-bottom: 12px; }
.section-heading h2 { font-size: 13px; color: #506f63; }
.section-heading>span { font-size: 11px; color: #718472; }
.letter-paper { background: #fffef5; padding: 24px 21px 18px; box-shadow: 3px 4px 0 #e1e7d8, 0 7px 18px #677b4c0b; border-color: #dcdcc4; }
.letter-paper:before { content: ''; position: absolute; width: 66px; height: 16px; top: -8px; left: calc(50% - 33px); background: #d5e3c6ad; transform: rotate(3deg); }
.letter-paper h3 { font-size: 23px; color: #687851; }
.letter-paper p { font-size: 12px; color: #6c7b64; line-height: 2; }
.letter-date { font-size: 10px; color: #7f8e73; }
.condition { font-size: 11px; color: #687d5f; line-height: 1.6; }
.letter-signature { font-size: 14px; color: #6a7c5c; }
.primary-button { min-height: 40px; background: #60836b; box-shadow: 0 3px 0 #4d705a; font-size: 12px; border-radius: 5px; }
.primary-button:disabled { box-shadow: none; background: #e1e6d5; color: #758368; }
.subtle-link { min-height: 36px; font-size: 11px; color: #65806c; }
.parcel-section { margin-top: 18px; padding-top: 18px; }
.parcel { background: #e1ead8; border: 1px solid #b9cdb4; box-shadow: 5px 8px 0 #d9e3ce, 0 12px 16px #41624116; width: 192px; height: 141px; }
.parcel:before,.parcel:after { background: #c7dabb; border-color: #9bb894; }
.parcel-art { width: 115px; height: 44px; position: relative; background: url('../assets/stationery-border.png') center / cover; }
.parcel-art svg { filter: drop-shadow(1px 2px 0 #fafaf0); }
.parcel-title { color: #416a50; font-size: 21px; }
.parcel-seal { background: #bb7970; box-shadow: inset 0 0 0 2px #c68c80, 0 2px 2px #75483724; }
.pack-button { min-height: 43px; background: #5b8067; font-size: 12px; box-shadow: 0 3px 0 #45684e; }
.pity-caption { font-size: 10px; color: #718263; }
.discovery-item { font-size: 11px; color: #6e8475; }
.daily-button { min-height: 44px; font-size: 11px; color: #657b65; }
.sidebar-note { font-size: 14px; color: #7e9376; }
.page-footer { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; max-width: none; min-height: 166px; padding: 35px 24px 22px; margin-top: 24px; border-top: 1px solid #d2dec8; background: #e8f0e3; overflow: hidden; isolation: isolate; }
.footer-art { position: absolute; inset: 0; z-index: -1; background: url('../assets/stationery-border.png') center bottom / min(1400px, 100%) auto no-repeat; opacity: .65; }
.footer-copy { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #55724f; }
.footer-copy svg { width: 25px; height: 25px; }
.footer-copy strong { font-family: 'STKaiti','KaiTi',serif; font-size: 24px; font-weight: 500; }
.footer-copy span { font-size: 11px; color: #6f8866; }
.page-footer>small { margin-top: 13px; font-size: 9px; color: #7d9271; }
.mobile-nav { display: none; }
dialog { background: #fafcf5; padding: 28px; border: 1px solid #cfdbc6; box-shadow: 0 30px 100px #2c4d3540; }
dialog::backdrop { background: #314e485e; backdrop-filter: blur(6px); }
.modal-heading { border-bottom: 1px solid #dbe5d2; padding-bottom: 17px; }
.modal-heading h2 { font-size: 29px; color: #567151; }
.modal-heading>.icon-button { width: 42px; height: 42px; background: #edf2e6; }
.album-grid { gap: 14px; }
.album-item { border: 1px solid #d8e1cc; background: #fffef6; padding: 13px; box-shadow: 0 3px 0 #e4e9d9; }
.album-item h3 { font-size: 13px; color: #536f4b; }
.album-item p { color: #77886a; font-size: 11px; }
.album-item button { min-height: 36px; font-size: 11px; padding: 6px 10px; }
.rarity-label { font-size: 10px; }
.letter-row h3 { font-size: 16px; color: #547250; }
.letter-row p { font-size: 13px; color: #71836b; }
.letter-number { color: #9fb291; }
.reveal-card { box-shadow: 0 4px 0 #e0e6d5; }
.card-back { background: #e3ecd8; border: 1px dashed #acbf9e; }
.card-back svg { color: #87a478; }
.reveal-card h3 { color: #52704a; }
.reveal-card.hidden-rarity { background: #fcf8e6; box-shadow: 0 4px 0 #e5d4a6; }
.setting-row { font-size: 14px; padding: 20px 0; }
.setting-row p { font-size: 12px; color: #77866d; }
.secondary-button { min-height: 40px; font-size: 12px; }
.sound-row { font-size: 14px; }
.sound-row input { height: 40px; }
.scene-toast { font-size: 13px; padding: 12px 18px; color: #486e54; }
.growth-chapter h3 { font-size: 16px; }
.growth-chapter p { font-size: 13px; color: #71846c; }
.global-toast { bottom: 26px; }
body.focus-mode { height: 100dvh; overflow: hidden; }
body.focus-mode .topbar,body.focus-mode .studio-heading,body.focus-mode .pipi-journal,body.focus-mode .sidebar,body.focus-mode .page-footer,body.focus-mode .mobile-nav { display: none; }
body.focus-mode .workspace { display: block; padding: 0; max-width: none; }
body.focus-mode .studio { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
body.focus-mode .scene-shell { flex: 1; min-height: 120px; display: flex; flex-direction: column; border-radius: 0; }
body.focus-mode .canvas-wrap { height: auto; flex: 1; min-height: 0; }
body.focus-mode .editor-dock { flex: 0 0 auto; }
body.focus-mode .scene-top,body.focus-mode .scene-bottom { flex-shrink: 0; }
@media (max-width: 1450px) {
  .workspace { grid-template-columns: minmax(0,1fr) 238px; padding: 17px 18px 0; gap: 18px; }
  .drawer-heading { flex-wrap: wrap; }
  .drawer-heading>.filter-tabs { order: 3; width: 100%; }
  .drawer-actions { margin-left: auto; }
  .letter-paper { padding: 23px 17px 17px; }
  .pipi-journal p { display: none; }
  .pipi-journal-copy { display: block; }
  .pipi-journal h2 { margin-top: 4px; }
}
@media (max-width: 1180px) {
  .workspace { display: block; padding: 14px 16px 0; }
  .sidebar { display: none; }
  .canvas-wrap { height: clamp(450px, 63dvh, 800px); }
  .pipi-journal { display: none; }
  .drawer-heading { flex-wrap: nowrap; }
  .drawer-heading>.filter-tabs { order: 0; width: auto; }
  .drawer-heading h2 { font-size: 18px; }
  .main-nav { gap: 2px; }
  .nav-item { padding: 0 10px; }
}
@media (max-width: 820px) {
  .topbar { height: 65px; padding: 0 16px; gap: 12px; }
  .brand-icon { display: grid; width: 34px; height: 48px; }
  .brand-icon img { width: 34px; height: 51px; }
  .brand strong { font-size: 24px; }
  .brand small { font-size: 9px; }
  .main-nav { display: none; }
  .header-tools { gap: 5px; }
  .header-tools .icon-button { width: 40px; height: 40px; }
  .currency { min-height: 36px; padding: 7px 9px; }
  .workspace { padding: 12px 0 0; }
  .studio-heading { padding: 0 15px; margin-bottom: 12px; }
  .studio-heading h1 { font-size: 22px; }
  .studio-heading .eyebrow { font-size: 9px; }
  .studio-actions #save-state { display: none; }
  .postcard-button { min-height: 39px; padding: 8px 10px; }
  .scene-shell { border-left: 0; border-right: 0; border-radius: 0; }
  .scene-top { padding: 5px 13px; min-height: 49px; }
  .scene-label { font-size: 12px; }
  .canvas-wrap { height: clamp(390px, 57dvh, 670px); }
  .scene-bottom { font-size: 10px; padding: 0 13px; }
  .editor-dock { border-left: 0; border-right: 0; }
  .workbench { padding: 6px 11px; min-height: 52px; gap: 4px; }
  .tool-group .icon-button { width: 39px; height: 39px; }
  .divider { margin: 0 3px; }
  .tool-group { gap: 2px; }
  .zoom-tools { order: 1; }
  body.has-selection #selection-tools { display: flex; flex-wrap: wrap; justify-content: start; gap: 3px; padding-top: 9px; padding-bottom: 3px; }
  .selected-name { display: block; flex: 1; width: auto; max-width: 100px; font-size: 12px; margin: 0 5px 0 0; }
  .size-control { flex: 1 0 100%; order: 1; max-width: none; padding: 2px 3px; }
  #scale { flex: 1; width: 50px; min-width: 30px; max-width: 160px; margin: 0 2px; }
  .size-control .icon-button { width: 34px; height: 38px; }
  .size-value { height: 38px; width: 41px; }
  #selection-tools>.icon-button { width: 40px; height: 44px; }
  .sticker-drawer { padding: 0 14px 10px; }
  .drawer-heading { flex-wrap: wrap; gap: 8px; padding: 12px 0 9px; }
  .drawer-heading h2 { font-size: 19px; }
  .drawer-heading h2 span { display: inline; font-size: 10px; }
  .drawer-heading>.filter-tabs { order: 3; width: 100%; justify-content: space-between; gap: 5px; }
  .filter-tabs button { flex: 1; padding: 6px 8px; font-size: 12px; min-height: 38px; }
  .drawer-actions { gap: 2px; }
  .gift-drawer-button { display: none; }
  .drawer-actions .icon-button { width: 36px; height: 38px; }
  .sticker-tray { gap: 10px; min-height: 128px; padding: 4px 1px 12px; }
  .sticker-card { flex-basis: 102px; height: 115px; }
  .sticker-card canvas { width: 84px; height: 78px; }
  .sticker-card span { font-size: 11px; }
  .drawer-footnote { font-size: 9px; }
  .drawer-footnote span:last-child { display: none; }
  .mobile-nav { position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); background: #fcfdf6f5; border-top: 1px solid #cbd9c2; box-shadow: 0 -5px 18px #3c604f0d; padding: 6px max(8px,env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)); backdrop-filter: blur(12px); }
  .mobile-nav button { min-height: 49px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 4px; font-size: 10px; color: #789074; }
  .mobile-nav button svg { width: 21px; height: 21px; }
  .mobile-nav button.active { color: #4f7751; background: #eaf1df; }
  .mobile-nav button:nth-child(2) { color: #b27865; }
  .page-footer { margin-top: 0; padding-bottom: calc(100px + env(safe-area-inset-bottom)); min-height: 260px; }
  .footer-art { background-size: auto 190px; background-position: center top; }
  .global-toast { bottom: calc(83px + env(safe-area-inset-bottom)); }
  dialog { width: calc(100% - 24px); max-height: 86dvh; padding: 23px 19px; }
  .modal-heading h2 { font-size: 25px; }
  .album-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
  .album-item { padding: 9px 6px; }
  .album-item canvas { height: 90px; }
  .album-item h3 { font-size: 11px; }
  .album-item p { font-size: 10px; }
  .album-item button { min-height: 38px; padding: 5px; font-size: 10px; }
  .growth-chapter h3 { font-size: 14px; }
  .growth-chapter p { font-size: 12px; }
  body.focus-mode .sticker-drawer { padding-bottom: 0; }
  body.focus-mode .drawer-footnote { display: none; }
}
@media (max-width: 420px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .brand { gap: 6px; }
  .brand strong { font-size: 23px; }
  .brand small { font-size: 8px; }
  .header-tools { gap: 1px; }
  .header-tools .icon-button { width: 36px; }
  .studio-heading h1 { font-size: 20px; }
  .postcard-button span { display: none; }
  .postcard-button { width: 40px; justify-content: center; }
  .workbench { padding: 6px 8px; gap: 2px; }
  .tool-group .icon-button { width: 34px; height: 40px; }
  .tool-group { gap: 0; }
  .zoom-value { min-width: 36px; font-size: 10px; }
  #selection-tools>.icon-button { width: 36px; }
  .size-control { max-width: none; }
  .size-control .icon-button { width: 27px; }
  #scale { max-width: 115px; }
  .drawer-heading h2 { font-size: 18px; }
  .filter-tabs button { padding: 6px 4px; gap: 4px; }
  .filter-tabs svg { width: 13px; }
}
@media (max-height: 600px) and (orientation: landscape) {
  .topbar { height: 56px; }
  .canvas-wrap { height: 72dvh; min-height: 280px; }
  body.focus-mode .sticker-tray { min-height: 84px; }
  body.focus-mode .sticker-card { height: 76px; flex-basis: 88px; }
  body.focus-mode .sticker-card canvas { height: 47px; width: 60px; }
  body.focus-mode .drawer-heading { padding: 5px 0; flex-wrap: nowrap; }
  body.focus-mode .drawer-heading>.filter-tabs { width: auto; order: 0; }
  body.focus-mode .drawer-heading h2 { display: none; }
  body.focus-mode .scene-bottom { display: none; }
  body.focus-mode .scene-top { min-height: 40px; padding-top: 0; padding-bottom: 0; }
  body.focus-mode .depth-bar { flex-wrap: nowrap; }
  body.focus-mode .depth-selection { flex-basis: auto; min-width: 180px; }
  body.focus-mode.has-selection #selection-tools { flex-wrap: nowrap; overflow-x: auto; padding-top: 4px; }
  body.focus-mode .selected-name { display: none; }
  body.focus-mode .size-control { order: 0; flex: 0 0 220px; }
  body.focus-mode .editor-dock { padding-bottom: env(safe-area-inset-bottom); }
}
