.mf-share-views{display:flex;gap:.5rem;padding:.35rem 1rem .65rem}.mf-share-views [aria-pressed=true]{background:#304c40;color:white}.work-card-dialog .work-card-body[hidden]{display:none!important}.mf-portrait-options .work-card-options label{display:grid;gap:.3rem}.mf-portrait-options .work-card-options .mf-clean{display:flex;align-items:center;gap:.5rem}.mf-portrait-options .mf-clean input{width:auto}.mf-portrait-options canvas{display:block;width:auto;max-width:100%;height:auto;max-height:65vh;margin:auto;object-fit:contain}

.mf-share-views {flex-wrap:wrap}
.mf-portrait-options [hidden] {display:none !important}
.work-card-dialog .mf-screen-options {grid-template-columns:minmax(0,1fr);gap:12px}
.mf-screen-options .work-card-picture {padding:0;overflow:hidden}
.mf-screen-options canvas {max-height:50dvh}
.mf-screen-options .work-card-options {width:min(100%,36rem);margin-inline:auto}
.mf-how-to span {display:inline-block}
/* The 儲存 menu (ui/workMenu.js): a small panel under the top bar's right end, each item a name with a line saying what it does.
   It is a child of the top bar, so it stands above the stage and the drawers (the top bar's z-index), and the auto-arrange screen
   that hides the top bar hides it too. */
.work-menu{position:absolute;top:calc(100% + 6px);right:var(--gxr);width:270px;max-width:calc(100vw - 24px);box-sizing:border-box;padding:6px;display:grid;gap:2px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:0 4px 16px rgba(0,0,0,.14)}
.work-menu button{display:grid;gap:2px;text-align:left;padding:9px 12px;border:0;border-radius:10px;background:none;color:var(--ink);font:500 14px var(--body);cursor:pointer}
.work-menu button:hover{background:var(--bg)}
.work-menu button span{font-size:12px;font-weight:400;color:var(--muted)}
.work-menu hr{border:0;border-top:1px solid var(--line);margin:4px 8px}
#workBtn[aria-expanded="true"]{border-color:var(--accent);color:var(--accent)}
/* The save panel (ui/saves.js), opened from the 儲存 menu. */

/* the dialog is the 分享 card's: the same frame, backdrop and head */
.save-dialog{box-sizing:border-box;width:min(760px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);overflow:hidden}
.save-dialog[open]{display:flex;flex-direction:column;gap:10px}
.save-dialog::backdrop{background:rgba(30,35,29,.46)}
.save-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.save-head h2{flex:1;margin:0;font-family:var(--display);font-size:20px;letter-spacing:.04em;color:var(--ink);font-weight:700}
.seg.save-modes{grid-template-columns:repeat(2,1fr)}
.save-modes button{min-height:40px}
/* what a press did, or why not: dark, not the grey of a note, so it is not missed */
.save-status{min-height:1.55em;margin:0;color:var(--ink);font-weight:500}
/* only the list scrolls: the mode switch and the backup links stay in reach. 1 1 auto, not flex:1: the iPhone's WebKit (Erin,
   2026-11-13) gives a 0% basis no height in this auto-height column dialog, and the list, 新存檔 with it, was squeezed to a line */
.save-body{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:2px}
.save-empty{margin:0;padding:28px 8px;text-align:center;color:var(--muted);font-size:13px}

.save-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px}
@media(max-width:520px){.save-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.save-slot{display:flex;flex-direction:column;min-width:0;border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden}
.save-slot:has(.save-pick:hover){border-color:var(--accent)}
.save-slot.is-broken{opacity:.8}
.save-pick{display:flex;flex-direction:column;align-items:stretch;gap:5px;min-width:0;padding:0 0 8px;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.save-pick:focus-visible{outline-offset:-3px}
/* every picture box is the same size, 4 wide to 5 high, whatever shape the picture is, so the tiles, their names and their buttons line up;
   the picture is shown whole inside it (contain), the box's colour showing at its sides or above and below. The picture lies over the box
   (absolute) rather than being sized by it, and the box does not shrink in its tile's column (flex:none), so neither depends on how the engine
   works a height out from aspect-ratio. */
.save-thumb{position:relative;display:grid;place-items:center;flex:none;width:100%;aspect-ratio:4/5;background:var(--bg);overflow:hidden}
.save-thumb img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain}
.save-nothumb{color:var(--muted);font-size:12px}
.save-tag{align-self:flex-start;margin:2px 10px 0;padding:1px 8px;border-radius:999px;background:var(--accent);color:var(--accent-ink);font-size:11px;letter-spacing:.06em}
.save-name{padding:0 10px;font-weight:500;line-height:1.35;overflow-wrap:anywhere}
.save-meta{display:flex;flex-wrap:wrap;gap:0 8px;padding:0 10px;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.save-actions{margin-top:auto;display:flex;border-top:1px solid var(--line)}
.save-del{flex:1;min-height:40px;border:0;background:none;color:var(--muted);font:500 12px var(--body);cursor:pointer}
.save-del:hover{color:var(--sel)}
/* "覆蓋這一格？" and "刪除這一格？": the question and its two answers, in the tile's own foot */
.save-actions.is-confirm{flex-wrap:wrap;align-items:center;gap:6px;padding:8px 10px}
.save-ask{flex:1 0 100%;font-size:13px}
.save-actions.is-confirm .btn{flex:1;min-height:40px;padding:6px 8px}
/* a phone's tile is about 105px wide: tighter sides so the two answers stay side by side, each word on one line (in an even narrower
   tile, nowrap makes them stack rather than break a word in two) */
@media(max-width:520px){
 .save-actions.is-confirm{padding:8px 6px;gap:6px 4px}
 .save-actions.is-confirm .btn{padding:6px 4px;white-space:nowrap}
}
.save-new{border-style:dashed}
.save-new .save-pick{flex:1 1 auto;align-items:center;justify-content:center;gap:4px;padding:16px 8px;color:var(--accent)}
.save-plus{font-size:34px;line-height:1}

.save-foot{display:flex;flex-direction:column;gap:2px;padding-top:6px;border-top:1px solid var(--line)}
.save-foot .note{margin:0}
.save-backup{display:flex;flex-wrap:wrap;align-items:center;gap:0 14px;margin:0;font-size:12px;color:var(--muted)}
.save-link{padding:8px 0;border:0;background:none;color:var(--accent);font:500 12px var(--body);text-decoration:underline;text-underline-offset:2px;cursor:pointer}
@media(max-width:650px){.save-dialog{padding:12px}}
body.vessel-library-open #stage > :not(canvas){visibility:hidden}
.vessel-card img{border-radius:5px;background:#f0f0eb}
.vessel-card .vessel-choose{transition:background-color .12s ease,border-color .12s ease}
@media(max-width:650px){.vessel-card img{height:80px}.vessel-card strong{line-height:1.4}}
/* the three colours of glass (2026-11-19): a light catch over the colour and a thin edge, so 透明 reads as clear glass */
#vesselFinishes i.glass{background-image:linear-gradient(135deg,#fffd 0,#fff0 58%);box-shadow:inset 0 0 0 1px #0003}

/* The catalogue and the selected vessel's controls each scroll beside the live stage. */
@media(min-width:1024px){
 body.vessel-library-open{--vessel-panel-width:clamp(548px,54vw,880px)}
 body.vessel-library-open #stage{left:calc(var(--rail-w) + var(--vessel-panel-width));bottom:0}
 #vesselLibrary{
  top:calc(var(--topbar) + env(safe-area-inset-top,0px));right:auto;bottom:0;left:var(--rail-w);
  width:var(--vessel-panel-width);height:calc(100dvh - var(--topbar) - env(safe-area-inset-top,0px));max-height:none;
  overflow:hidden;border-top:0;border-right:1px solid #c8c8b9;box-shadow:none;padding:14px 16px;
 }
 #vesselLibrary[open]{display:flex;flex-direction:column}
 #vesselLibrary header,#vesselLibrary nav{flex:none}
 #vesselLibrary nav{flex-wrap:wrap;gap:5px;padding:10px 0 8px}
 #vesselLibrary nav button{padding:6px 8px;white-space:nowrap}
 #vesselLibrary .vessel-layout{
  flex:1;min-height:0;height:auto;display:grid;
  grid-template-columns:minmax(0,1fr) clamp(174px,15vw,232px);grid-template-rows:minmax(0,1fr);gap:12px;
 }
 #vesselLibrary #vesselCards{
  grid-template-columns:repeat(auto-fill,minmax(135px,1fr));
  align-content:start;overscroll-behavior:contain;scrollbar-gutter:stable;
 }
 #vesselLibrary .vessel-card img{height:clamp(98px,8vw,124px)}
 #vesselLibrary .vessel-options{
  min-width:0;min-height:0;padding:2px 4px 0 12px;
  border-left:1px solid #d9d9cd;overscroll-behavior:contain;
 }
 #vesselLibrary .vessel-actions{border-top:1px solid #d9d9cd}
 #vesselLibrary #vesselUse{width:100%}
 #vesselLibrary .vessel-options p{margin:6px 0}
 #vesselLibrary .vessel-viewpoints{margin:6px 0}
 #vesselLibrary #vesselFinishes{gap:5px}
 #vesselLibrary #vesselFinishes button{padding:4px 7px;font-size:12px}
}
@media(min-width:1024px) and (max-height:620px){
 #vesselLibrary .vessel-card img{height:78px}
 #vesselLibrary .vessel-choose{padding:4px 6px 6px}
}

.vessel-scale,.vessel-color{display:flex;gap:.45rem;align-items:center;flex-wrap:wrap;margin:.65rem 0}
.vessel-scale input[type=range]{flex:1 1 6rem;min-width:3rem;accent-color:#52674a}
.vessel-scale output{font-variant-numeric:tabular-nums}
.vessel-color input{width:2.2rem;height:1.7rem;padding:1px;border:1px solid #b9bcae;border-radius:4px;background:transparent}
/* The controls and information pane must fit even in a short phone viewport. */
body.picker-open{--picker-height:54dvh}
body.picker-open #stage{bottom:min(var(--picker-height),max(0px,calc(100dvh - 140px)))}
#flowerPicker{height:var(--picker-height,54dvh);max-height:var(--picker-height,54dvh);overflow:hidden}
#flowerPicker .pk-head{flex:none;min-height:32px}
#flowerPicker .pk-head h2{margin:0}
#flowerPicker .pk-toolbar{display:flex;align-items:center;gap:10px;flex:none;margin:6px 0 2px;min-width:0}
#flowerPicker .pk-search{display:flex;align-items:center;gap:8px;flex:1;min-width:0}
#flowerPicker .pk-search span{font-size:13px;white-space:nowrap;color:var(--muted)}
#flowerPicker .pk-search input{box-sizing:border-box;width:100%;min-width:0;min-height:36px;border:1px solid var(--line);border-radius:8px;padding:7px 10px;background:var(--surface);color:var(--ink);font:16px var(--body)}
#flowerPicker .pk-status{flex:none;max-width:13em;margin:0;font-size:12px;line-height:1.3;color:var(--muted)}
#flowerPicker .tabs{display:flex;flex:none;overflow-x:auto;white-space:nowrap;gap:3px;scrollbar-width:thin}
#flowerPicker .tabs button{flex:none;min-height:36px}
#flowerPicker .pk-body{min-height:0}
#flowerPicker .pk-grid{min-height:0}
#flowerPicker .pk-cell{position:relative}
#flowerPicker .pk-info{overflow:hidden;display:flex;flex-direction:column;min-width:0}
#flowerPicker .pk-detail{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
#flowerPicker .pk-big{margin:0 auto 8px;flex:none}
#flowerPicker .pk-nb{white-space:nowrap}
#flowerPicker .pk-info-heading{display:flex;align-items:flex-start;gap:7px;flex-wrap:wrap}
#flowerPicker .pk-info-heading strong{flex:1;min-width:3em}
#flowerPicker .pk-actions{flex:none;padding-top:7px}
#flowerPicker .pk-go{width:100%;margin:0;min-height:42px}
#flowerPicker button:focus-visible,#flowerPicker input:focus-visible{outline:2px solid var(--sel);outline-offset:2px}
#flowerPicker .pk-empty{padding:10px 3px;line-height:1.5}
@media(max-width:650px){
 body.picker-open{--picker-height:70dvh}
 #flowerPicker .pk-toolbar{gap:6px}
 #flowerPicker .pk-status{max-width:8em;font-size:11px}
 #flowerPicker .pk-search span{display:none}
 #flowerPicker .pk-body{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:8px}
 #flowerPicker .pk-info{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;max-height:25dvh;align-items:stretch}
 #flowerPicker .pk-info.is-empty{display:none}
 #flowerPicker .pk-detail{display:grid;grid-template-columns:64px minmax(0,1fr);gap:9px;align-items:start}
 #flowerPicker .pk-big{width:64px;margin:0}
 #flowerPicker .pk-info-heading{gap:3px}
 #flowerPicker .pk-info-heading strong{font-size:16px}
 #flowerPicker .pk-actions{align-self:center;padding:0}
 #flowerPicker .pk-go{min-height:44px;padding:10px 11px}
}
@media(max-width:380px){
 #flowerPicker .pk-detail{grid-template-columns:minmax(0,1fr)}
 #flowerPicker .pk-big{display:none}
 #flowerPicker .pk-search input{padding-inline:8px}
}
@media(max-height:520px) and (orientation:landscape){
 body.picker-open{--picker-height:100dvh}
 #flowerPicker{padding-top:max(6px,env(safe-area-inset-top,0px));padding-bottom:max(6px,env(safe-area-inset-bottom,0px))}
 #flowerPicker .pk-head{min-height:28px}
 #flowerPicker .pk-head h2{font-size:18px}
 #flowerPicker .pk-head .btn{padding:5px 10px;min-height:30px}
 #flowerPicker .pk-toolbar{margin:3px 0 0}
 #flowerPicker .pk-search{max-width:500px}
 #flowerPicker .pk-search input{min-height:32px;padding-block:5px}
 #flowerPicker .tabs{margin-top:2px}
 #flowerPicker .tabs button{min-height:30px;padding-block:5px}
 #flowerPicker .pk-body{grid-template-columns:minmax(0,1fr) minmax(200px,32%);grid-template-rows:minmax(0,1fr);gap:10px;padding-top:5px}
 #flowerPicker .pk-grid{grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:5px}
 #flowerPicker .pk-info{display:flex;max-height:none;gap:3px;padding:7px}
 #flowerPicker .pk-detail{display:block;min-height:0;overflow:auto}
 #flowerPicker .pk-big{display:none}
 #flowerPicker .pk-text strong{font-size:16px}
 #flowerPicker .pk-facts{font-size:12px}
 #flowerPicker .pk-actions{align-self:stretch;padding-top:4px}
 #flowerPicker .pk-go{min-height:38px;padding:7px 10px}
}

/* Plain flower-name chips share the picker state but create no image nodes. Only the list is different: the information area on
   the other side of it (the picture, the facts, 選好，開始插) and the panel's height have no rule of their own here, so they are the
   picture view's at every width (collapsed at 54dvh on a phone left under three rows of names once a flower was chosen). */
#flowerPicker .pk-view-toggle{white-space:nowrap;min-height:36px}
#flowerPicker.pk-compact .pk-grid{display:flex;flex-direction:column;gap:14px;align-content:normal;padding:3px}
#flowerPicker.pk-compact .pk-simple-group{flex:none;min-width:0}
#flowerPicker.pk-compact .pk-simple-group h3{font:500 12px var(--body);color:var(--muted);letter-spacing:.06em;margin:0 0 7px}
#flowerPicker.pk-compact .pk-simple-chips{display:flex;flex-wrap:wrap;gap:6px}
#flowerPicker.pk-compact .pk-cell{display:inline-flex;flex-direction:row;justify-content:center;flex:none;min-height:36px;max-width:100%;padding:6px 11px;border-radius:999px;font:500 13px var(--body)}
#flowerPicker.pk-compact .pk-name{line-height:1.4}

/* The desktop workspace (1024px and up, index.html): the picker is a panel at the left, from under the top bar to the foot of the screen, beside the
   column of 選花, 花器 and 調整 (--rail-w) and --panel-w wide, in place of the sheet across the foot. The stage gives up the room, so the work stays whole
   in the block to its right. The pictures are three across; the facts of the flower chosen (its picture beside them, and 選好，開始插) stay at the foot of
   the panel, and only the pictures scroll. Each rule says #flowerPicker, as the ones it replaces do, so that it wins over them whatever the height. */
@media(min-width:1024px){
 body.picker-open #stage{left:calc(var(--rail-w) + var(--panel-w));bottom:0}
 #flowerPicker{top:calc(var(--topbar) + env(safe-area-inset-top,0px));right:auto;bottom:0;left:var(--rail-w);width:var(--panel-w);height:auto;max-height:none;border-top:0;border-right:1px solid var(--line);box-shadow:none;padding:12px 16px}
 #flowerPicker .pk-body{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:10px;padding-top:10px}
 #flowerPicker .pk-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 #flowerPicker .pk-info{max-height:min(46dvh,330px);padding:12px}
 #flowerPicker .pk-info.is-empty{padding:9px 12px}
 #flowerPicker .pk-detail{flex:0 1 auto;display:grid;grid-template-columns:92px minmax(0,1fr);gap:12px;align-items:start}
 #flowerPicker .pk-big{display:block;width:92px;margin:0}
 #flowerPicker .pk-info-heading strong{font-size:18px}
 #flowerPicker .pk-actions{padding-top:10px}
}
/* Clear primary actions: the bottom bar's three buttons (＋ 選花 and 花器, which ui/picker.js and ui/vessels.js put there, and 調整), the
   top bar's and the tool column's. */
#openFlowerPicker{color:var(--accent);font-weight:700}
.app .botbar button{min-height:48px;font-size:14px}
.app .topbar #undoTop,.app .topbar #redoTop{width:44px;height:44px;flex-shrink:0}
.app .topbar{gap:6px}
/* 清空花器, 儲存 and 分享 are never cut: the title is what gives way */
.app .topbar .btn{flex-shrink:0;white-space:nowrap}
.app button:focus-visible{outline:2px solid var(--sel);outline-offset:3px}
/* A durable next step replaces the fading hint while a material is held. */
.insert-status{position:absolute;left:var(--gx);bottom:34px;z-index:13;display:flex;gap:12px;align-items:center;width:max-content;max-width:calc(100% - var(--gx) - var(--gxr));padding:10px 12px;background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:0 3px 12px rgba(0,0,0,.09)}
.insert-status>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.insert-status strong{font-size:14px;color:var(--accent)}
.insert-status span{font-size:12px;line-height:1.5}
.insert-status .done-btn{position:static;min-width:68px;padding:0 14px;flex-shrink:0;box-shadow:none;font-size:14px}
/* the fixed insertion angle, when it is on (ui/insertPose.js): what it is, and the way to let it go */
.insert-fixed{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin:0}
.insert-fixed .btn{min-height:32px;padding:3px 12px;border-radius:999px}
/* a phone standing up: the title needs about 394px beside 清空花器, 儲存 and 分享, and a title cut to half with an ellipsis looks like a
   fault, so below 420px it is left to the screen reader (clipped, not removed) and the buttons keep the right end of the bar */
@media(max-width:420px){
 .app .topbar{justify-content:flex-end}
 .app .topbar h1{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
}
@media(max-width:700px){
 .app .topbar h1{font-size:18px;letter-spacing:0}
 .app .topbar .btn{min-height:40px}
 .app .tools{gap:6px;--tool-h:46px}
 .app .tool{width:44px}
 .insert-status{width:calc(100% - var(--gx) - var(--gxr));gap:8px;padding:9px 10px}
 .app .botbar button{font-size:13px;padding:0 4px}
}
/* a small phone standing up (568px high and the like) with the scene panel open: the stage left above the panel is too short for one column of seven tools.
   The tools are two columns wide (the first, 畫風, at the top of the left one), so the direction dial starts left of both (index.html --dial-x), as scene.css puts the panel */
@media(max-width:700px) and (max-height:616px){
 .scene-open .tools{top:10px;transform:none;display:grid;grid-template-columns:repeat(2,auto);gap:5px}
 .scene-open .stage{--dial-x:122px}
}
/* a phone on its side: seven tools in one column would stand taller than the stage, so they stand in two columns from the top, and the dial starts left of both */
@media(max-height:540px){
 .app .topbar .btn{min-height:40px}
 .app .tools{top:10px;transform:none;display:grid;grid-template-columns:repeat(2,auto);gap:5px}
 .app .stage{--dial-x:122px}
 .app .tool{line-height:1.1}
 .insert-status{bottom:24px;padding:6px 10px;width:auto}
 .insert-status .done-btn{min-height:40px}
}

.stage:not(.picking) #insertStatus{display:none}
#exhibitAtFlora{color:#faf6ed;background:#284537;border:1px solid #284537;min-height:40px;font:inherit;font-size:13px;font-weight:600}
#exhibitAtFlora:disabled{opacity:.75}
.exhibit-feedback{position:absolute;top:100%;right:var(--gxr,12px);margin:4px 0;padding:8px 12px;background:#fffdf5;color:#283d32;border:1px solid #b2b8a7;max-width:90vw;font-size:13px;line-height:1.4}
@media(max-width:780px){
 .app{--topbar:94px}
 .app .topbar{padding-bottom:42px}
 .app #exhibitAtFlora{position:absolute;right:var(--gxr,12px);bottom:4px;min-height:36px;padding:4px 15px;font-size:13px}
}

.flora-placement-loading {position:fixed;inset:0;z-index:2147483647;background:#000;color:#fff;display:grid;place-items:center;text-align:center}
.flora-placement-loading span {animation:flora-placement-pulse 1.25s ease-in-out infinite alternate}
@keyframes flora-placement-pulse {from{opacity:.5}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.flora-placement-loading span{animation:none}}
html:not(.flora-placing) .flora-placement-loading {display:none}
html.flora-placing {overflow:hidden}
