
[hidden] { display: none !important; }

.btn-primary {
  --btn-ac: var(--fire);
  --btn-on: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--tap-primary); padding: 0 22px;
  border: 0; border-radius: var(--r-pill);
  background: var(--btn-ac); color: var(--btn-on);
  text-decoration: none;
  font: 700 var(--fs-body)/1 var(--font-body); white-space: nowrap; cursor: pointer;
}
.btn-primary:hover  { filter: brightness(.94); }
.btn-primary:active { filter: brightness(.88); transform: translateY(1px); }
.btn-primary[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
button[aria-busy="true"], a[aria-busy="true"] { position: relative; color: transparent !important; pointer-events: none; }
button[aria-busy="true"][disabled] { opacity: 1; cursor: progress; }
button[aria-busy="true"]::after, a[aria-busy="true"]::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px;
  background-color: var(--btn-on, var(--ink, #1a1a1a));
  -webkit-mask: url("/icons/uzumaki-spinner.svg") center/contain no-repeat;
          mask: url("/icons/uzumaki-spinner.svg") center/contain no-repeat;
  animation: bnto-spin .8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  button[aria-busy="true"]::after, a[aria-busy="true"]::after { animation: none; }
}
@media (min-width: 900px) { .btn-primary { height: var(--tap); font-size: var(--fs-note); } }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--tap); padding: 0 20px;
  border: 1.5px solid var(--hair); border-radius: var(--r-pill);
  background: transparent; color: var(--text);
  text-decoration: none;
  font: 600 var(--fs-note)/1 var(--font-body); white-space: nowrap; cursor: pointer;
}
.btn-secondary:hover { background: var(--tint); }
.btn-secondary:active { background: var(--nb-press, var(--tint)); transform: translateY(1px); }

.btn-text {
  display: inline-flex; align-items: center; gap: 4px;
  height: var(--tap); padding: 0 8px;
  border: 0; background: transparent; color: var(--fire-text, var(--fire-dark));
  text-decoration: none;
  font: 600 var(--fs-note)/1 var(--font-body); white-space: nowrap; cursor: pointer;
}

.btn-icon {
  display: grid; place-items: center;
  width: var(--tap); height: var(--tap);
  border: 0; border-radius: 50%;
  background: transparent; color: var(--text); cursor: pointer;
  text-decoration: none;
}
.btn-icon:hover { background: var(--tint); }
.btn-icon:active { background: var(--nb-press, var(--tint)); transform: translateY(1px); }
.btn-icon--bordered { border: 1.5px solid var(--hair); background: var(--canvas-card); }
.btn-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-icon svg[viewBox="0 -960 960 960"] { fill: currentColor; stroke: none; }

.btn-danger {
  display: inline-flex; align-items: center;
  height: var(--tap); padding: 0 8px;
  border: 0; background: transparent; color: var(--danger);
  font: 600 var(--fs-note)/1 var(--font-body); white-space: nowrap; cursor: pointer;
}
.btn-danger--outlined { padding: 0 18px; border: 1.5px solid var(--danger); border-radius: var(--r-pill); font-weight: 700; }

.chip {
  display: inline-flex; align-items: center;
  height: 36px; padding: 0 14px; flex: none;
  border: 1px solid var(--hair); border-radius: var(--r-pill);
  background: transparent; color: var(--text);
  font: 500 var(--fs-note)/1 var(--font-body); white-space: nowrap; cursor: pointer;
}
.chip[aria-pressed='true'] { background: var(--text); border-color: var(--text); color: var(--canvas); font-weight: 600; }

.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--tint); }
.segmented > button {
  height: 36px; padding: 0 22px; flex: none;
  border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--text);
  font: 600 var(--fs-note)/1 var(--font-body); white-space: nowrap; cursor: pointer;
}
.segmented > a {
  height: 36px; padding: 0 22px; flex: none;
  border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--text);
  font: 600 var(--fs-note)/1 var(--font-body); white-space: nowrap; cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
}
.segmented > button[aria-selected='true'] { background: var(--canvas-card); font-weight: 700; }
.segmented > a[aria-current='page'] { background: var(--canvas-card); font-weight: 700; color: var(--text); }
.segmented > button,
.segmented > a,
.toggle { position: relative; }
.segmented > button::before,
.segmented > a::before,
.toggle::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: max(100%, var(--tap)); height: max(100%, var(--tap));
}

.page-head {
  display: flex; align-items: center; gap: 6px;
  width: 100%; max-width: var(--content-max); margin: 0 auto;
  height: 48px; padding: 0 8px 0 16px;
  border-bottom: 1px solid var(--hair);
  background: var(--glass-bg); backdrop-filter: var(--glass-blur);
  position: sticky; top: 0; z-index: 5;
}
.page-head__title { font: 900 var(--fs-body)/1 var(--font-body); white-space: nowrap; }
.page-head__meta  { font: 600 var(--fs-mini)/1 var(--font-body); color: var(--text-dim); white-space: nowrap; }
.page-head__spacer { margin-inline-start: auto; }
.page-head .btn-primary, .page-head .btn-secondary { height: var(--tap); font-size: var(--fs-mini); padding: 0 18px; }

.field {
  width: 100%; height: var(--tap);
  padding: 0 12px;
  border: 1px solid var(--hair); border-radius: var(--r-input);
  background: var(--canvas-card); color: var(--text);
  font: 400 16px/1 var(--font-body);
}
.field:focus-visible { outline: 2px solid var(--col-ac, var(--fire)); outline-offset: 1px; }
.field-label { display: block; font: 700 var(--fs-mini)/1.4 var(--font-body); color: var(--text-dim); margin-bottom: 4px; }

.stepper { display: inline-flex; align-items: center; height: var(--tap); border: 1px solid var(--hair); border-radius: var(--r-input); background: var(--canvas-card); }
.stepper > button { width: var(--tap); height: var(--tap); border: 0; background: transparent; color: var(--text); font-size: 18px; cursor: pointer; }
.stepper > output { width: 36px; text-align: center; font: 700 var(--fs-body)/1 var(--font-body); }

.toggle { position: relative; width: 44px; height: 26px; flex: none; border: 0; border-radius: 13px; background: var(--hair); cursor: pointer; }
.toggle::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: inset-inline-start .16s ease; }
.toggle[aria-pressed='true'] { background: var(--col-ac, var(--fire)); }
.toggle[aria-pressed='true']::after { inset-inline-start: 21px; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,.38); }
.sheet {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 401;
  max-height: 86vh; overflow: auto;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  background: var(--canvas-card); color: var(--text);
  box-shadow: var(--elev-sheet);
  display: flex; flex-direction: column; gap: 12px;
}
.sheet--lifted { max-height: calc(100dvh - 10px); }
@keyframes nb-sheet-rise { from { transform: translateY(100%); } }
@keyframes nb-scrim-in { from { opacity: 0; } }
@media (max-width: 899px) {
  .sheet { animation: nb-sheet-rise 0.28s cubic-bezier(0.2, 0, 0, 1); }
  .sheet-backdrop { animation: nb-scrim-in 0.2s ease-out; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet,
  .sheet-backdrop { animation: none; }
}
@media (min-width: 900px) {
  .sheet {
    inset: auto;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: min(560px, 86%);
    max-height: 78vh;
    border-radius: var(--r-sheet);
    padding: 16px;
  }
  .sheet__grip { display: none; }
}
@keyframes nb-dialog-in { from { opacity: 0; scale: 0.92; } }
@keyframes nb-dialog-pop { from { scale: 0.92; } }
@keyframes nb-dialog-in-centered { from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); } }
.mp2-prompt-modal,
.mp2-ov-panel:not(.mp2-avcrop-panel),
.kiji-ph-ov-panel { animation: nb-dialog-in 0.15s ease-out; }
.bt-share-overlay > [role="dialog"] { animation: nb-dialog-pop 0.15s ease-out; }
.mp2-prompt-modal::backdrop,
.mp2-ov-scrim,
.kiji-ph-ov-scrim { animation: nb-scrim-in 0.15s ease-out; }
@media (min-width: 900px) {
  .sheet,
  .spot-map-filter-overlay-panel { animation: nb-dialog-in-centered 0.15s ease-out; }
  .sheet-backdrop { animation: nb-scrim-in 0.15s ease-out; }
}
@media (prefers-reduced-motion: reduce) {
  .mp2-prompt-modal,
  .mp2-prompt-modal::backdrop,
  .mp2-ov-panel:not(.mp2-avcrop-panel),
  .mp2-ov-scrim,
  .kiji-ph-ov-panel,
  .kiji-ph-ov-scrim,
  .bt-share-overlay > [role="dialog"],
  .sheet,
  .sheet-backdrop,
  .spot-map-filter-overlay-panel { animation: none; }
}
@media (max-width: 899px) {
  .sheet__grip,
  .sheet__head { touch-action: none; }
}
.sheet__grip { width: 40px; height: 4px; flex: none; margin: 0 auto; border-radius: 2px; background: var(--hair); }
.sheet__head { display: flex; align-items: center; gap: 8px; flex: none; }
.sheet__body {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 12px;
  padding-inline: 3px; margin-inline: -3px;
}
.sheet__body > * { flex: none; }
.sheet__body button,
.sheet__body input,
.sheet__body select,
.sheet__body textarea,
.sheet__body .field,
.sheet__body .stepper,
.sheet__body .toggle { flex: none; }
.sheet__title { font: 900 18px/1 var(--font-body); white-space: nowrap; }
.sheet__head .btn-primary { margin-inline-start: auto; height: var(--tap); padding: 0 20px; font-size: var(--fs-note); }

.top-nav { height: 60px; background: var(--glass-bg); backdrop-filter: var(--glass-blur); border-bottom: 1px solid var(--glass-edge); display: flex; justify-content: center; }
.top-nav__inner { width: 100%; max-width: var(--content-max); padding: 0 40px; display: flex; align-items: center; gap: 6px; }
.top-nav a { display: flex; align-items: center; gap: 7px; flex: none; height: 38px; padding: 0 14px; border-radius: var(--r-pill); color: var(--text); text-decoration: none; font: 500 13px/1 var(--font-body); white-space: nowrap; }
.top-nav a[aria-current='page'] { background: var(--fire); color: var(--text); font-weight: 700; }
.top-nav a[aria-current='page'] svg { stroke-width: 2.4; }
.top-nav svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 899px) { .top-nav { display: none; } }

.action-row {
  position: fixed; inset-inline: 0; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 30;
  padding: 0 16px; display: flex; gap: 8px;
}
.action-row .btn-primary { flex: 1; box-shadow: var(--elev-float); }
.action-row .btn-secondary { flex: none; height: var(--tap-primary); background: var(--canvas-card); }
.scroll-fade { position: absolute; inset-inline: 0; bottom: 0; height: 110px; pointer-events: none; background: linear-gradient(180deg, transparent, var(--canvas) 62%); }
@media (min-width: 900px) { .action-row, .scroll-fade { display: none; } }

.toast {
  position: fixed; inset-inline: 16px; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); z-index: 50;
  display: flex; justify-content: center; pointer-events: none;
}
.toast > span {
  display: inline-flex; align-items: center; gap: 8px;
  height: var(--tap); padding: 0 20px;
  border-radius: var(--r-pill);
  background: #1C1B19; color: #fff;
  font: 600 var(--fs-note)/1 var(--font-body); white-space: nowrap;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}
.toast svg { width: 17px; height: 17px; fill: none; stroke: var(--col-ac, var(--fire)); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.notice {
  display: flex; align-items: flex-start; gap: 8px; flex: none;
  padding: 10px 16px;
  font: 400 var(--fs-mini)/1.6 var(--font-body);
}
.notice svg { width: 16px; height: 16px; flex: none; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.notice--danger  { background: var(--danger-bg); border-bottom: 1px solid var(--danger-edge); color: var(--danger); }
.notice--private { background: var(--tint); border-bottom: 1px solid var(--hair); color: var(--text); }

.bnto-load {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: var(--space-sm, 16px) 0;
}
.bnto-load-spinner {
  width: 40px;
  height: 40px;
  flex: none;
  background-color: var(--fire, #FF7601);
  -webkit-mask: url("/icons/symbol.svg") center / contain no-repeat;
          mask: url("/icons/symbol.svg") center / contain no-repeat;
  animation: bnto-spin .8s linear infinite;
}
@keyframes bnto-spin { to { transform: rotate(360deg); } }
.bnto-skel-host { position: relative; }
.bnto-load--over {
  position: absolute;
  inset: 0;
  min-height: 0;
  padding: 0;
  pointer-events: none;
}
#mp2-loading > .bnto-load--over,
#an2-voice-list[aria-busy="true"] > .bnto-load,
#kiji-list[aria-busy="true"] > .bnto-load {
  position: fixed;
  inset: 0;
  min-height: 0;
  padding: 0;
  pointer-events: none;
}
#an2-voice-list[aria-busy="true"] {
  min-height: 100svh;
}
@media (prefers-reduced-motion: reduce) {
  .bnto-load-spinner { animation: none; }
}

.av-wait { position: relative; background: var(--nb-wait, #E4E4E7) !important; color: transparent !important; }
.av-wait > :not(.av-wait-spin) { visibility: hidden; }
.av-wait-spin { display: none; }
.av-wait > .av-wait-spin {
  display: block;
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(76%, max(22px, 40%));
  height: min(76%, max(22px, 40%));
  background-color: var(--fire, #FF7601);
  -webkit-mask: url("/icons/uzumaki-spinner.svg") center / contain no-repeat;
          mask: url("/icons/uzumaki-spinner.svg") center / contain no-repeat;
  animation: bnto-spin .8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .av-wait > .av-wait-spin { animation: none; }
}

.dl-act,
.chip,
.notice-link,
.colev-tab,
.an-all-link,
.nf-link,
.btn-text-link,
.action-btn--share,
.action-btn--ig,
#bt-select-toggle,
.news-chip-filter,
.spot-map-search-btn,
.spot-map-filter-open {
  position: relative;
}
.dl-act::after,
.chip::after,
.notice-link::after,
.colev-tab::after,
.an-all-link::after,
.nf-link::after,
.btn-text-link::after,
.action-btn--share::after,
.action-btn--ig::after,
#bt-select-toggle::after,
.news-chip-filter::after,
.spot-map-search-btn::after,
.spot-map-filter-open::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
}
