/* The shrine office (view #goshuin, js/office.js): the two hanging signs that switch windows, the long
   building that slides between them; the omamori window (js/omamori.js): the board of charms, "My
   charms", the card a charm is lifted onto and its paper bag; the office on the path with the
   visitor's charms dangling. The goshuin window's own parts are in css/stamps.css. */

/* ---------- the two signs: Goshuin | Omamori (equal; the one shown hangs forward) ---------- */
.of-tabs {
  position: relative; z-index: 2; flex: none;
  display: flex; justify-content: center; align-items: flex-start; gap: 14px;
  height: 54px; padding-top: 12px;
}
.of-tab {
  --tb-bg: #f1edff; --tb-edge: #c9bdf6; --tb-ink: var(--lilac-ink); --tb-ja: #7d6cc4;
  position: relative; min-width: 136px; height: 38px; padding: 0 14px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 13px; border: 2.5px solid var(--tb-edge); background: var(--tb-bg);
  box-shadow: 0 3px 0 var(--tb-edge); color: var(--tb-ink);
  font-size: 16.5px; font-weight: 700; line-height: 1; cursor: pointer; touch-action: manipulation;
  transform-origin: 50% -12px; transition: transform .45s cubic-bezier(.3, 1.4, .5, 1), opacity .3s, background-color .3s, box-shadow .3s;
}
.of-tab[data-tab="omamori"] { --tb-bg: #fff0f4; --tb-edge: #f3bccb; --tb-ink: #86394f; --tb-ja: #cf6f8a; }
.of-tab::before, .of-tab::after { /* the two cords it hangs from */
  content: ''; position: absolute; top: -14px; width: 3px; height: 12px; border-radius: 2px; background: var(--straw-deep);
}
.of-tab::before { left: 20px; } .of-tab::after { right: 20px; }
.of-tab-ja { font-family: var(--kanji); font-size: 14px; font-weight: 600; color: var(--tb-ja); letter-spacing: .04em; }
.of-tab[aria-selected="true"] {
  transform: translateY(2px) scale(1.04);
  box-shadow: 0 4px 0 var(--tb-edge), 0 9px 18px rgba(110, 95, 170, .16);
  animation: signSway 4.6s ease-in-out infinite;
}
.of-tab[aria-selected="false"] { transform: translateY(-3px) scale(.93); opacity: .78; background: rgba(255, 255, 255, .75); box-shadow: 0 2px 0 var(--tb-edge); }
.of-tab[aria-selected="false"]:hover { opacity: .95; }
@media (max-width: 360px) { .of-tabs { gap: 10px; } .of-tab { min-width: 0; padding: 0 11px; font-size: 15px; } .of-tab-ja { font-size: 12.5px; } }
@media (max-height: 620px) { .of-tabs { height: 48px; padding-top: 10px; } .of-tab { height: 34px; } }

/* ---------- the building: 750 × 560 units ----------
   One at a time (phones, narrow windows): W = one window's width; the window shown sits against the
   far side so ~46px of the neighbour peeks in at the near edge (#ofPeek, a tap there goes over); on a
   taller-than-wide scene it is simply centred. The building slides between the two.
   Wide (≥ 820px, .of-wide): the whole building, both windows live; the column widens to hold it. */
@property --of-fl { syntax: '<number>'; inherits: false; initial-value: 1; }
@property --of-fr { syntax: '<number>'; inherits: false; initial-value: 1; }
.view-office { overflow-x: clip; }   /* the building runs on past the column on a wide window, never past the window */
.of-scene {
  --P: 46px;                                     /* how much of the neighbour peeks in */
  --W: min((100cqw - var(--P)) / .975, 76.8cqh, 460px);
  --xg: min(50cqw - var(--W) / 2, 100cqw - var(--P) - var(--W) * .965);      /* the building's left, goshuin shown */
  --xo: max(50cqw - var(--W) * 1.375, var(--P) - var(--W) * .91);            /* the building's left, omamori shown */
  padding-left: 0; padding-right: 0; touch-action: pan-y;
  /* a strip of ground in front of the building: the visitor's avatar stands on it (css/avatar.css .sp-goshuin) */
  --of-lift: clamp(6px, 2.6cqh, 20px);
}
.of-office {
  position: absolute; bottom: var(--of-lift); left: 0;
  width: calc(var(--W) * 1.875); aspect-ratio: 750 / 560;
  transform: translateX(var(--xg));
  /* the window not in use stays pale where it can be seen (--of-fl: the goshuin side, --of-fr: the omamori side) */
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, var(--of-fl)) 39%, #000 46.5% 53.5%, rgba(0, 0, 0, var(--of-fr)) 61%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, var(--of-fl)) 39%, #000 46.5% 53.5%, rgba(0, 0, 0, var(--of-fr)) 61%);
  transition: --of-fl .4s ease, --of-fr .4s ease;
}
.view-office[data-tab="omamori"] .of-office { transform: translateX(var(--xo)); }
.view-office:not(.of-wide)[data-tab="goshuin"] .of-office, .view-office.of-wide[data-busy="goshuin"] .of-office { --of-fr: .38; }
.view-office:not(.of-wide)[data-tab="omamori"] .of-office, .view-office.of-wide[data-busy="omamori"] .of-office { --of-fl: .38; }
.of-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* the neighbour's edge: a tap target over it, a soft fade and a small chevron saying "more this way" */
.of-peek {
  position: absolute; z-index: 2; bottom: 4%; height: calc(var(--W) * 1.12); max-height: 92%;
  right: 0; width: max(44px, 100cqw - var(--xg) - var(--W) * .965);
  padding: 0; border: 0; background: linear-gradient(90deg, rgba(246, 241, 255, 0), rgba(246, 241, 255, .55));
  border-radius: 18px 0 0 18px; cursor: pointer; touch-action: pan-y; color: var(--lilac-ink);
  display: flex; align-items: center; justify-content: flex-end; padding-right: 3px;
}
.view-office[data-tab="omamori"] .of-peek {
  right: auto; left: 0; width: max(44px, var(--xo) + var(--W) * .91);
  background: linear-gradient(270deg, rgba(255, 240, 246, 0), rgba(255, 240, 246, .55));
  border-radius: 0 18px 18px 0; justify-content: flex-start; padding: 0 0 0 3px; color: #b0566f;
}
.of-peek-chev {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, .85); box-shadow: 0 0 0 2px currentColor; opacity: .8;
  animation: peekNudge 2.4s ease-in-out infinite;
}
.of-peek-chev svg { width: 15px; height: 15px; }
.view-office[data-tab="omamori"] .of-peek-chev svg { transform: scaleX(-1); }
@keyframes peekNudge { 0%, 60%, 100% { translate: 0 0; } 75% { translate: 4px 0; } 85% { translate: -1px 0; } }
.view-office[data-tab="omamori"] .of-peek-chev { animation-name: peekNudgeL; }
@keyframes peekNudgeL { 0%, 60%, 100% { translate: 0 0; } 75% { translate: -4px 0; } 85% { translate: 1px 0; } }
.of-peek:hover .of-peek-chev, .of-peek:focus-visible .of-peek-chev { opacity: 1; }
.view-office.sheet-open .of-peek, .view-office.om-lifted .of-peek { visibility: hidden; }
/* the controls of each window, in the same place; only the shown window's */
.of-controls { position: relative; flex: none; }
.om-controls { position: absolute; inset: 0; height: auto; }
.view-office:not(.of-wide)[data-tab="goshuin"] .om-controls, .view-office:not(.of-wide)[data-tab="omamori"] .gs-controls { visibility: hidden; }
/* the window not shown keeps quiet: its coin tray does not call, its hanko do not bob */
.view-office:not(.of-wide)[data-tab="omamori"] .gs-cointray.call::after, .view-office.of-wide[data-busy="omamori"] .gs-cointray.call::after { display: none; }
.view-office:not(.of-wide)[data-tab="omamori"] .gs-stamp[data-state="ready"], .view-office.of-wide[data-busy="omamori"] .gs-stamp[data-state="ready"] { animation-play-state: paused; }

/* ---------- wide: the whole office, both windows; each window's hint and money (¥500 coin, ¥1000 note) under it ---------- */
.view-office.of-wide .app { max-width: none; }
.view-office.of-wide .of-scene { --W: min((100cqw - 48px) / 1.875, 76.8cqh, 460px); --xg: calc(50cqw - var(--W) * .9375); --xo: var(--xg); }
.view-office.of-wide .of-peek { display: none; }
.view-office.of-wide .of-tabs {
  /* the two signs hang over their windows (window centres at 200 and 550 of the 750 units) */
  width: calc(var(--ofW, 400px) * 1.875); margin: 0 auto; padding-inline: calc(var(--ofW, 400px) * .0625);
  display: grid; grid-template-columns: 1fr 1fr; justify-items: center; gap: 0;
}
.view-office.of-wide .of-controls { width: calc(var(--ofW, 400px) * 1.875); margin: 0 auto; height: calc(var(--ctl) + 18px + env(safe-area-inset-bottom)); }
.view-office.of-wide .gs-controls, .view-office.of-wide .om-controls {
  position: absolute; top: 0; bottom: auto; width: calc(var(--ofW, 400px) * .9); padding-inline: 4px;
  transition: opacity .4s ease, filter .4s ease;
}
.view-office.of-wide .gs-controls { left: calc(var(--ofW, 400px) * .05); right: auto; }
.view-office.of-wide .om-controls { left: calc(var(--ofW, 400px) * .925); right: auto; inset-block: 0 auto; height: calc(var(--ctl) + 18px + env(safe-area-inset-bottom)); }
.view-office.of-wide .om-controls { padding-top: 8px; gap: 6px; }
.view-office.of-wide .controls .hint { text-align: center; text-wrap: balance; }
/* the side away from what is under way: pale, softly blurred, inert (office.js) */
.view-office.of-wide[data-busy="omamori"] .gs-controls, .view-office.of-wide[data-busy="goshuin"] .om-controls { opacity: .4; filter: blur(1px) saturate(.7); }
.view-office.of-wide[data-busy="omamori"] .gs-wrap, .view-office.of-wide[data-busy="goshuin"] .om-wrap { filter: blur(1.2px) saturate(.75); opacity: .55; transition: opacity .4s ease, filter .4s ease; }
.view-office.of-wide .gs-wrap, .view-office.of-wide .om-wrap { transition: opacity .4s ease, filter .4s ease; }
/* the charm card over the omamori window; the large page over the goshuin window */
.view-office.of-wide .om-lift-dim { top: 0; background: linear-gradient(180deg, rgba(246, 241, 255, 0), rgba(246, 241, 255, .55) 60px, rgba(255, 245, 249, .78) 60%, rgba(255, 245, 249, 0)); }
/* what pops up is centred in the window (the page and the card animate there from their window and back):
   the card in the middle of the scene (which is the whole window wide here); the large page is centred by
   .gs-sheet itself (css/stamps.css); the omamori controls (the hint, the ¥1000 note) follow the card to
   the middle, and the goshuin's own controls step out of the way meanwhile */
.view-office.of-wide .om-card { left: 50%; width: min(var(--W) * .95, 380px); }
.view-office.of-wide .om-controls { transition: opacity .4s ease, filter .4s ease, left .45s cubic-bezier(.3, .9, .4, 1); }
.view-office.of-wide.om-lifted .om-controls { left: calc(50% - var(--ofW, 400px) * .45); }
.view-office.of-wide.om-lifted .gs-controls { opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility 0s .25s; }

/* the omamori window's drawing */
.om-inside { fill: #fdf1f5; }
.om-inside-line { fill: none; stroke: #f6e1e9; stroke-width: 2; stroke-linecap: round; }
.om-noren-p { fill: #ffe2ea; stroke: #f0b1c3; stroke-width: 2; stroke-linejoin: round; }
.om-noren-t { font-family: var(--kanji); font-weight: 600; font-size: 25px; fill: #86394f; letter-spacing: .3em; }
.om-noren-t.sm { font-size: 9px; letter-spacing: .06em; }
.om-noren-wave { fill: none; stroke: #ffc8d6; stroke-width: 3; stroke-linecap: round; }
.om-noren-big { transform-box: view-box; transform-origin: 550px 126px; animation: noren 3.4s ease-in-out -1.7s infinite; }
.om-noren { transform-origin: 96px 40px; }
.om-board { fill: #f6dcc2; stroke: #e2b58f; stroke-width: 2.4; stroke-linejoin: round; }
.om-board-in { fill: #fff8f3; stroke: #f0d5c2; stroke-width: 1.6; }
.om-board-hi { fill: none; stroke: rgba(255, 255, 255, .75); stroke-width: 3; stroke-linecap: round; }
.om-rail { fill: #ecc39f; stroke: #d9a47c; stroke-width: 1.6; }
.om-peg { fill: #fbe3cc; stroke: #d9a47c; stroke-width: 1.4; }

/* ---------- the omamori window: the right 400 of the 750 units ---------- */
.om-wrap { position: absolute; left: 46.6667%; top: 0; width: 53.3333%; height: 100%; container-type: inline-size; }
.om-charm {
  position: absolute; z-index: 1; display: block; padding: 0; border: 0; background: none;
  aspect-ratio: 64 / 104; cursor: pointer; touch-action: manipulation;
}
.om-charm::before { content: ''; position: absolute; inset: -2% -14% -8%; }   /* a little more to tap than the drawing */
.om-sway, .om-mini-sway { display: block; width: 100%; height: 100%; transform-origin: 50% 3%; }
.om-sway { animation: omSway var(--dur, 3.4s) ease-in-out var(--delay, 0s) infinite; }
@keyframes omSway { 0%, 100% { rotate: calc(var(--amp, 3deg) * -1); } 50% { rotate: var(--amp, 3deg); } }
.om-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.om-charm .om-svg { filter: drop-shadow(0 3px 2px rgba(120, 90, 140, .16)); }
.om-kanji { font-family: var(--kanji); font-weight: 600; }
.om-charm.away { visibility: hidden; }
.om-charm:active .om-sway { scale: .96; }
/* a kind the visitor owns: a small tag on its foot */
.om-yours {
  display: none; position: absolute; left: 50%; bottom: 2%; translate: -50% 0; z-index: 1;
  padding: 1px 5px 2px; border-radius: 7px; background: #fffdf8; border: 1.5px solid #f3bccb;
  font-size: max(8.5px, 2.5cqw); font-weight: 700; line-height: 1; color: #b0566f; white-space: nowrap; pointer-events: none;
}
.om-charm.owned .om-yours { display: block; }
.om-cap {
  position: absolute; z-index: 1; text-align: center; text-wrap: balance; pointer-events: none;
  font-size: max(9px, 2.8cqw); font-weight: 700; line-height: 1.05; color: #8b7a92;
}
.om-wrap:not([data-state="idle"]) .om-charm, .om-wrap:not([data-state="idle"]) .om-mini { pointer-events: none; }

/* My charms: a cord across the counter front, one small charm of each kind owned, newest first. Its
   strip (window units 36–252) ends before the coin tray (262–346) and its 初穂料; omamori.js sizes the
   small charms (--mw the drawing, --slot the tap width ≥ 28px) or, when they cannot all fit, makes it
   a bundle that opens into a row above (.compact / .open). */
.om-mine { position: absolute; z-index: 1; left: 9%; top: 81.6%; width: 54%; display: flex; align-items: flex-start; gap: 6px; }
.om-mine::before {
  content: ''; position: absolute; left: -2%; right: 0; top: 2px; height: 3.5px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, #f6b4ac 0 5px, #fde3df 5px 8px); box-shadow: 0 0 0 1px #eaa298;
}
.om-mine-tag {
  flex: none; position: relative; margin-top: 7px; padding: 2px 6px 3px; border-radius: 8px;
  background: #fff6ea; border: 1.5px solid #f6cdb9; color: var(--coral-ink);
  font-size: max(9px, 2.6cqw); font-weight: 700; line-height: 1; white-space: nowrap;
}
.om-mine-row { position: relative; display: flex; gap: 0; align-items: flex-start; min-width: 0; }
.om-mini { position: relative; flex: none; display: block; padding: 0; border: 0; background: none; width: var(--slot, 28px); height: calc(var(--mw, 20px) * 1.625); cursor: pointer; touch-action: manipulation; }
.om-mini::before { content: ''; position: absolute; inset: -4px 0 -6px; }
.om-mini-sway { margin: 0 auto; width: var(--mw, 20px) !important; }
/* the bundle: the small charms overlap a little; the whole strip is one button */
.om-mine-open {
  position: absolute; z-index: 2; inset: -4px -4px -8px -4px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 10px;
  display: flex; align-items: flex-start; justify-content: flex-end; touch-action: manipulation;
}
.om-mine-open[hidden] { display: none; }
.om-mine.compact:not(.open) .om-mini { width: calc(var(--mw) + 2px); pointer-events: none; }
.om-mine.compact:not(.open) .om-mini.more, .om-mine.compact:not(.open) .om-count { display: none; }
.om-mine-more {
  flex: none; align-self: center; margin-left: 2px; padding: 1px 5px 2px; border-radius: 9px; background: #fffdf8; border: 1.5px solid var(--coral-deep);
  font-size: 11px; font-weight: 700; line-height: 1.2; color: var(--coral-ink); white-space: nowrap;
}
.om-mine-more[hidden], .om-mine.open .om-mine-more { display: none; }
/* opened: the small charms in a row of their own just above the strip, full size to tap */
.om-mine.open .om-mine-row {
  position: absolute; z-index: 4; left: -2%; bottom: calc(100% + 8px); width: max-content; max-width: 146%;
  flex-wrap: wrap; gap: 4px 2px; padding: 8px 8px 10px; border-radius: 16px;
  background: #fffdf8; border: 2px solid #f6d6df; box-shadow: 0 3px 0 #f6d6df, 0 10px 20px rgba(110, 95, 170, .18);
  animation: hintIn .35s cubic-bezier(.3, 1.4, .5, 1);
}
.om-mine.open .om-mini { width: var(--slot); height: calc(var(--mw) * 1.625 * 1.25); }
.om-mine.open .om-mini-sway { width: calc(var(--mw) * 1.25) !important; }
.om-mine.open { z-index: 5; }
.om-mine.open .om-mine-open { z-index: 1; }

/* the price, up front: a wooden tag hanging from each end of the lower rail */
.om-price {
  position: absolute; z-index: 1; margin: 0; top: 59.4%; width: 11%; translate: -50% 0; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; animation: omSway 4.2s ease-in-out -1s infinite; --amp: 2.5deg;
}
.om-price#omPrice { left: 82.6%; }
.om-price.ja { left: 17.2%; width: 8.5%; animation-delay: -2.6s; }
.om-price::before { content: ''; width: 2px; height: 2.4cqw; background: #d9a47c; border-radius: 1px; }
.om-price-in {
  display: flex; flex-direction: column; align-items: center; gap: 1px; width: 100%;
  padding: 1.4cqw 0 1.6cqw; border-radius: 1.6cqw 1.6cqw 2.4cqw 2.4cqw;
  background: #fbe3cc; border: 1.6px solid #d9a47c; box-shadow: 0 2px 0 rgba(200, 150, 110, .25);
  color: #8a5a3c; line-height: 1;
}
.om-price-in b { font-size: max(10px, 3.3cqw); font-weight: 700; letter-spacing: -.02em; }
.om-price-in span { font-size: max(8.5px, 2.5cqw); font-weight: 600; }
.om-price.ja .om-price-in { writing-mode: vertical-rl; font-family: var(--kanji); font-size: max(8.5px, 2.6cqw); font-weight: 600; letter-spacing: .08em; padding: 1.4cqw 0; color: #9a6a4a; }
.om-mini .om-count { right: calc((var(--slot, 28px) - var(--mw, 20px)) / 2 - 6px); }
.om-count {
  position: absolute; right: -7px; bottom: 4%; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px;
  display: grid; place-items: center; background: #fffdf8; border: 1.5px solid var(--coral-deep);
  font-size: 10.5px; font-weight: 700; line-height: 1; color: var(--coral-ink);
}
.om-cointray.drop-target::after { content: ''; position: absolute; inset: -12% 4%; border-radius: 50%; border: 3px dashed rgba(255, 255, 255, .95); box-shadow: 0 0 0 7px rgba(246, 207, 99, .95); background: rgba(255, 240, 186, .6); }

/* ---------- the card a charm is lifted onto (over the board; the coin tray stays clear) ---------- */
.om-lift {
  --low: calc(var(--W) * .235);                  /* the counter front from the coin tray down stays clear */
  --zh: calc(100cqh - var(--low) - 16px);        /* the room for the card */
  position: absolute; inset: 0; z-index: 3;
}
.om-lift-dim {
  position: absolute; left: 0; right: 0; top: -60px; bottom: var(--low);
  background: linear-gradient(180deg, rgba(246, 241, 255, .55), rgba(255, 245, 249, .78) 60%, rgba(255, 245, 249, 0));
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.om-card {
  position: absolute; left: 50%; top: calc(6px + var(--zh) / 2); translate: -50% -50%;
  width: min(100% - 20px, 420px); max-height: var(--zh);
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px;
  padding: 12px 14px 12px 12px; border-radius: 22px;
  background: #fffdf8; border: 2.5px solid #f6d6df; box-shadow: 0 5px 0 #f6d6df, 0 18px 34px rgba(110, 95, 170, .2);
}
.om-card-art { position: relative; height: min(var(--zh) - 30px, 200px); aspect-ratio: 64 / 104; justify-self: center; }
.om-big, .om-bag { position: absolute; inset: 0; }
.om-big { z-index: 1; transform-origin: 50% 0; }
.om-big .om-svg { transform-origin: 50% 3%; animation: omSway 3.8s ease-in-out infinite; --amp: 2deg; filter: drop-shadow(0 6px 6px rgba(120, 90, 140, .16)); }
.view-office:is([data-om-state="paying"], [data-om-state="bagging"], [data-om-state="done"]) .om-big .om-svg { animation: none; }
.om-bag { display: none; z-index: 0; }
.om-bag.on { display: block; }
.om-bag-front { z-index: 2; }
.om-bag-svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 5px 6px rgba(120, 90, 140, .14)); }
.om-bag-up, .om-bag-flap { transform-box: view-box; transform-origin: 32px 34px; }
.om-bag-flap { transform: scaleY(0); }
.om-bag-front.shut .om-bag-flap { transform: scaleY(1); }
.om-card-art:has(.om-bag-front.shut) .om-bag-up { visibility: hidden; }
.om-card-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.om-card-text p { margin: 0; }
.om-card-ja { font-family: var(--kanji); font-size: 14px; font-weight: 600; color: #cf6f8a; letter-spacing: .18em; }
.om-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.om-card-price {
  flex: none; padding: 2px 8px 3px; border-radius: 999px; background: #fff3d6; border: 1.5px solid #f0cf86;
  font-size: 14px; font-weight: 700; line-height: 1.1; color: #8f6a1e;
}
.om-card[data-mode="mine"] .om-card-price { display: none; }
.om-card-name { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.12; color: var(--ink); }
.om-card-purpose { font-size: 14px; font-weight: 600; line-height: 1.25; color: #9a5a72; }
.om-card-line { font-size: 13.5px; font-weight: 500; line-height: 1.32; color: var(--ink-soft); }
.om-card-meta { font-size: 13px; font-weight: 600; color: #a3917f; }
.om-card-meta:empty { display: none; }
.om-card-meta.kind { font-size: 17px; font-weight: 700; color: var(--coral-ink); animation: hintIn .5s cubic-bezier(.3, 1.4, .5, 1); }
.om-save { align-self: flex-start; margin-top: 4px; }
.om-status:empty { display: none; }
.om-close { position: absolute; z-index: 3; top: -14px; right: -8px; width: 40px; height: 40px; }
.om-close svg { width: 18px; height: 18px; }
.om-card[data-mode="chosen"] .om-card-meta:not(.kind) { font-size: 12.5px; }
/* a short screen: the warm line gives way when the card holds Save image */
@container (max-height: 300px) { .om-card[data-mode="mine"] .om-card-line { display: none; } }
/* a taller scene (phones upright, laptops): the charm above its words */
@container (min-height: 470px) {
  .om-card {
    grid-template-columns: 1fr; justify-items: center; text-align: center;
    width: min(100% - 28px, 360px); padding: 16px 16px 14px; align-content: center;
  }
  .om-card-art { height: min(var(--zh) - 235px, 235px); }
  .om-card[data-mode="mine"] .om-card-art { height: min(var(--zh) - 300px, 210px); }
  .om-card-text { align-items: center; }
  .om-card-head { justify-content: center; }
  .om-save { align-self: center; }
  .om-card-name { font-size: 22px; }
}

/* ---------- the office on the path: the visitor's charms dangle at its right end ---------- */
.pt-charm { animation: ptCharm 2.9s ease-in-out infinite; }
@keyframes ptCharm { 0%, 100% { rotate: -7deg; } 50% { rotate: 7deg; } }
.pt-charm-cord { fill: none; stroke: #ec9f97; stroke-width: 1.2; stroke-linecap: round; }

@media (prefers-reduced-motion: reduce) {
  .of-tab, .om-sway, .om-mini-sway, .om-price, .of-peek-chev, .om-mine.open .om-mine-row, .om-big .om-svg, .om-noren-big, .pt-charm, .om-card-meta.kind { animation: none !important; }
  .of-tab, .of-office, .gs-wrap, .om-wrap, .gs-controls, .om-controls { transition: none !important; }
}

/* ---------- the ¥1000 note (js/coins.js noteSVG): the omamori window's money, a paper note in landscape ---------- */
.coin.yen1000 {
  --size: 96px;
  width: 96px; height: 54px; border: 0; border-radius: 7px; padding: 0; background: none;
  display: block; filter: drop-shadow(0 4px 6px rgba(110, 100, 170, .2));
}
button.coin.yen1000 { animation: noteFlutter 2.2s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes noteFlutter { 0%, 100% { transform: translateY(0) rotate(-2.5deg); } 50% { transform: translateY(-7px) rotate(2.5deg) skewX(-3deg); } }
.coin.yen1000.dragging { scale: 1.08; box-shadow: none; filter: drop-shadow(0 12px 16px rgba(110, 100, 170, .3)); }
.coin.yen1000.placed { position: fixed; z-index: 71; transform-origin: 0 0; pointer-events: none; }
.note-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.nt-paper { fill: #e4e7ff; }
.nt-halo { fill: #eef0ff; }
.nt-wave { fill: none; stroke: #c9cdf4; stroke-width: 1.2; stroke-linecap: round; }
.nt-sheen { fill: #fff; opacity: .42; }
.nt-sheen.thin { opacity: .3; }
.nt-border { fill: none; stroke: #b9bfee; stroke-width: 1; stroke-dasharray: 2.2 1.6; }
.nt-emblem { fill: #fff8fb; stroke: #eab6c8; stroke-width: 1.6; }
.nt-flower ellipse { fill: #ffd3dc; stroke: #f0a9bb; stroke-width: .9; }
.nt-eye { fill: #f6cf63; stroke: #e5b84c; stroke-width: .7; }
.nt-num { font-family: var(--font); font-size: 9.6px; font-weight: 700; fill: #6e72bd; letter-spacing: .02em; }
.nt-edge { fill: none; stroke: #a9afe4; stroke-width: 2; }
.om-coin-row .coin-cap b { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { button.coin.yen1000 { animation: none; } }
