#flora-language,#flora-dialog button{border:1px solid #b8b4a2;background:#faf8ee;color:#26392f;border-radius:20px;padding:6px 10px;font:500 12px/1.3 system-ui;cursor:pointer}#flora-dialog{color:#26392f;background:#fbfaf4;border:1px solid #aca893;border-radius:12px;max-width:min(420px,82vw);padding:24px;z-index:10000}#flora-dialog::backdrop{background:#13241c70}#flora-dialog h2{font:normal 25px/1.3 Georgia,serif}#flora-dialog li{margin:.65em 0;line-height:1.55}#flora-dialog a{color:#244433;margin-right:14px}#flora-dialog button[aria-pressed=true]{background:#314c3d;color:white}#flora-dialog > div:not(#musicControl),#flora-dialog details > div{display:flex;gap:6px}
/* Language and exhibition guide on narrow screens. */
@media (max-width: 720px) {
  #flora-dialog {
    box-sizing: border-box;
    width: min(420px, calc(100% - 32px));
    max-width: none;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: clamp(18px, 5vw, 24px);
  }
  #flora-dialog > div:not(#musicControl), #flora-dialog details > div {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
  }
  #flora-dialog button {
    min-height: 44px;
    padding: 6px 12px;
    font-size: 0.875rem;
  }
  #flora-dialog h2 {
    display: block;
    margin: 0 0 14px;
    color: #26392f;
    font-size: clamp(1.375rem, 5.6vw, 1.5rem);
    line-height: 1.35;
    letter-spacing: 0.02em;
  }
  #flora-guide ol {
    margin: 0 0 20px;
    padding-inline-start: 1.6em;
    font-size: 1rem;
  }
  #flora-dialog li {
    margin: 0;
    padding-inline-start: 0.15em;
    line-height: 1.65;
  }
  #flora-dialog li + li {
    margin-top: 0.6em;
  }
}
@media(max-width:720px){.brand+nav{flex-wrap:wrap}header:has(>.brand){flex-wrap:wrap;gap:6px}}
@media(min-width:901px){
.app header.topbar {gap:8px;align-items:center}
.app header.topbar #flora-language {position:static;flex:none;min-height:36px}
.app header.topbar #shareBtn {background:var(--surface);color:var(--ink);border-color:var(--line)}
}
@media(max-width:900px){.topbar #flora-language{flex:none}}
@media(max-width:720px){.topbar #flora-language{position:fixed;top:calc(var(--topbar) + env(safe-area-inset-top,0px) + 2px);bottom:auto;left:var(--gx,8px);z-index:110;font-size:11px}}

.tools #openL {display:none}

#flora-dialog:has(details){width:min(320px,calc(100% - 32px));max-height:calc(100dvh - 32px);overflow-y:auto}
#flora-dialog details{padding-block:4px;border-bottom:1px solid #d9d5c8}
#flora-dialog summary{cursor:pointer;padding:10px 0}
#flora-dialog details[open]>div{margin:0 0 8px}
#flora-dialog details~button{margin-top:16px}

#flora-dialog #musicControl {
 color-scheme:light;
 --surface:#fbfaf4;
 --ink:#26392f;
 --muted:#53655b;
 --accent:#314c3d;
 --line:#c6c7b7;
 padding-block:4px;
 border-bottom:1px solid #d9d5c8;
}
#flora-dialog #musicTool {
 display:flex;
 flex-direction:row;
 justify-content:flex-start;
 align-items:center;
 gap:6px;
 width:100%;
 height:auto;
 min-height:40px;
 padding:8px 0;
 border:0;
 border-radius:0;
 background:transparent;
 color:inherit;
 font:inherit;
}
#flora-dialog #musicTool b {font-size:1em}
#flora-dialog #musicPanel {
 position:static;
 transform:none;
 width:100%;
 max-width:none;
 max-height:none;
 overflow:visible;
 margin:0;
 padding:2px 0 12px;
 background:transparent;
 border:0;
 box-shadow:none;
}
#flora-dialog .music-head {display:none}
#flora-dialog .music-desc {min-height:0}


/* The exhibit action belongs to the canvas, above the right-hand tools. exhibit-entry.mjs puts the exhibit button and the quiet
   link into the visitor's own room (逛我的展間, on its left) in one row. The row stands from top:22px and the button is 40px high,
   so the feedback line and the direction dial start below 62px. */
.app #stage > .exhibit-entry,
.app #stage > .exhibit-feedback {
 position:absolute;
 left:auto;
 right:calc(var(--gxr) + var(--dial-x, 0px));
 bottom:auto;
 max-width:calc(100% - var(--gx) - var(--gxr) - var(--dial-x, 0px));
}
.app #stage > .exhibit-entry {
 top:22px;
 z-index:6;
 display:flex;
 align-items:center;
 justify-content:flex-end;
 gap:8px;
 pointer-events:none;
}
.app #stage > .exhibit-entry > * {pointer-events:auto}
.app #stage > .exhibit-entry > #exhibitAtFlora {
 position:relative;
 inset:auto;
 flex:none;
 min-height:40px;
 padding:4px 12px;
 border-radius:999px;
}
.app #stage > .exhibit-entry > .exhibit-visit {
 flex:none;
 padding:0 6px;
 color:var(--ink);
 font:500 13px/1.3 var(--body);
 white-space:nowrap;
 text-decoration:underline;
 text-decoration-color:var(--muted);
 text-decoration-thickness:1px;
 text-underline-offset:4px;
 text-shadow:0 0 4px var(--surface),0 0 8px var(--surface);
}
.app #stage > .exhibit-entry > .exhibit-visit:hover {text-decoration-color:currentColor}
.app #stage > .exhibit-entry > .exhibit-visit:focus-visible {
 outline:2px solid var(--accent);
 outline-offset:2px;
 border-radius:4px;
}
.app #stage > .exhibit-feedback {
 top:64px;
 width:max-content;
 z-index:7;
}
.app #stage > .dial {top:70px}
.app:has(>header.topbar){--topbar:44px}
.app header.topbar > :is(.btn,.ibtn) {
 position:relative;
 min-height:32px;
 padding-block:4px;
}
.app header.topbar #undoTop,
.app header.topbar #redoTop {width:32px;height:32px;padding:0}
@media(pointer:coarse){
 .app header.topbar > :is(.btn,.ibtn)::before,
 .app #stage > .exhibit-entry > #exhibitAtFlora::before {
  content:"";
  position:absolute;
  inset:-6px 0;
 }
}
/* On a phone the link is at least 44px high to press; the negative margin keeps the row 40px high. The hint that stands at the
   top of the stage (index.html .hint.at-top; its left edge and width stay as they are there) moves under the row, 8px below
   the button like the dial, so it does not run beneath the link and the button. */
@media(pointer:coarse),(max-width:780px){
 .app #stage > .exhibit-entry > .exhibit-visit {
  line-height:44px;
  margin-block:-2px;
 }
 .app #stage .hint.at-top {top:70px}
}
@media(max-width:780px){
 .app header.topbar{flex-wrap:nowrap;padding-bottom:0}
}
@media(max-width:520px){
 .app header.topbar {
  justify-content:flex-start;
  gap:clamp(2px, 1vw, 5px);
  padding-inline:max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right));
 }
 .app header.topbar h1 {
  position:static;
  width:auto;
  height:auto;
  margin:0;
  clip:auto;
  clip-path:none;
  overflow:visible;
  flex:1 0 max-content;
  font-size:clamp(14px, 4vw, 18px);
  letter-spacing:0;
 }
 .app header.topbar .btn {
  padding-inline:clamp(5px, 1.7vw, 9px);
 }
 .app header.topbar #clearBtn {
  flex-shrink:1;
  min-width:3.5em;
  white-space:normal;
  line-height:1.15;
 }
}
