/* Motion Prompt #049 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#049 */
:root {
  --im-out:cubic-bezier(.215,.61,.355,1);
  --im-io:cubic-bezier(.645,.045,.355,1);
}
#dialog[open] {animation:im-modal .32s var(--im-out);}
#dialog[open]::backdrop {animation:im-scrim .32s var(--im-out);}
@keyframes im-modal {from{opacity:0;scale:.9}to{opacity:1;scale:1}}
@keyframes im-scrim {from{opacity:0}to{opacity:1}}
/* Close still follows the browser's native dialog and focus lifecycle. */
@supports (transition-behavior:allow-discrete) {
  #dialog:not([open]) {
    opacity:0;scale:.9;
    transition:opacity .28s var(--im-io),scale .28s var(--im-io),display .28s allow-discrete,overlay .28s allow-discrete;
    pointer-events:none;
  }
  #dialog::backdrop {transition:opacity .28s var(--im-io),display .28s allow-discrete,overlay .28s allow-discrete;}
  #dialog:not([open])::backdrop {opacity:0;}
}

/* Motion Prompt #052 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#052 */
:is(.orbit-shell,#dialog) details summary {cursor:pointer;}
.station-filters summary::after {transition:transform .35s var(--im-io);}
@supports (interpolate-size:allow-keywords) and selector(details::details-content) {
  :is(.orbit-shell,#dialog) details {interpolate-size:allow-keywords;}
  :is(.orbit-shell,#dialog) details::details-content {
    overflow:clip;block-size:0;opacity:0;
    transition:block-size .32s var(--im-io),opacity .32s var(--im-io),content-visibility .32s allow-discrete;
  }
  :is(.orbit-shell,#dialog) details[open]::details-content {opacity:1;block-size:auto;transition-duration:.35s;}
}

/* Motion Prompt #053 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#053 */
/* Motion Prompt #159 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#159 */
:is(.orbit-shell,#dialog) :is(input,textarea,select) {
  transition:border-color .15s var(--im-out),box-shadow .15s var(--im-out),background-color .15s var(--im-out);
}
:is(.orbit-shell,#dialog) :is(input,textarea,select,button,summary,a):focus-visible {
  outline:2px solid var(--ds-ice);outline-offset:2px;
}
:is(.orbit-shell,#dialog) select:open {border-color:var(--ds-ice);box-shadow:inset 0 0 0 1px #a6d9ff;}
:is(.orbit-shell,#dialog) .im-invalid, .cash-form:has(#pay-error:not(:empty)) #pay-amount {
  border-color:var(--ds-bad);background-color:color-mix(in srgb,var(--ds-halo) 16%,var(--ds-s1));
}
:is(.orbit-shell,#dialog) .error-note:not(:empty) {animation:im-field-note .15s var(--im-out);}
@keyframes im-field-note {from{opacity:0}to{opacity:1}}

/* Motion Prompt #056 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#056 */
#toast {
  right:18px;left:auto;bottom:max(18px,env(safe-area-inset-bottom));overflow:hidden;
  transform:translateX(240px);opacity:0;transition:transform .35s var(--im-io),opacity .35s var(--im-io);
}
#toast.visible {transform:translateX(0);opacity:1;transition-timing-function:var(--im-out);}
#toast.visible::after {
  content:"";position:absolute;height:3px;bottom:0;left:0;right:0;transform-origin:left;
  background:var(--ds-ice);animation:im-toast-life 2.25s .35s linear both;
}
@keyframes im-toast-life {from{transform:scaleX(1)}to{transform:scaleX(0)}}
@media(max-width:720px) {
  body:has(.station-dock) #toast {bottom:calc(76px + env(safe-area-inset-bottom));}
}

/* Motion Prompt #057 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#057 */
:is(.journal-switch,.codebox .tabs) {position:relative;}
.im-tab-line {
  position:absolute;bottom:0;z-index:1;height:3px;border-radius:3px;background:var(--ds-ice);
  transform-origin:left;pointer-events:none;
}

/* Motion Prompt #061 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#061 */
#dialog [data-protocols] button::before {
  content:"✓";display:inline-block;overflow:hidden;width:18px;vertical-align:bottom;color:var(--ds-ice);
}
#dialog [data-protocols] .im-added-chip::before {animation:im-check-width .15s var(--im-out);}
@keyframes im-check-width {from{width:0;opacity:0}to{width:18px;opacity:1}}

/* Motion Prompt #070 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#070 */
.channel-probe .probe-running::before,.channel-probe .probe-cancelling::before {
  content:"";display:inline-block;vertical-align:-.12em;margin-right:5px;width:.85em;height:.85em;
  box-sizing:border-box;border:2px solid var(--ds-line-3);border-top-color:transparent;border-radius:50%;
  animation:im-spin .76923s linear infinite;
}
.channel-probe progress {accent-color:var(--ds-ice);}
@keyframes im-spin {to{transform:rotate(360deg)}}

/* Motion Prompt #081 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#081 */
@media(hover:hover) {
  .eclipse .protocol-row .protocol-glyph {transition:translate .3s var(--im-out),box-shadow .3s var(--im-out);}
  .eclipse .protocol-row:hover .protocol-glyph {translate:0 -10px;box-shadow:0 12px 22px #060a1f80;}
}
/* Motion Prompt #085 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#085 */
.im-relative {position:relative;}
.im-ink {position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;}
.im-wave {position:absolute;pointer-events:none;border-radius:50%;background:var(--ds-halo);}

/* Motion Prompt #086 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#086 */
.eclipse .plain-link {position:relative;}
.eclipse .plain-link::after {
  content:"";position:absolute;left:0;right:0;bottom:-2px;height:2px;background:currentColor;
  transform:scaleX(0);transform-origin:right;transition:transform .3s var(--im-out);
}
.eclipse .plain-link:is(:hover,:focus-visible)::after {transform:scaleX(1);transform-origin:left;}
/* Motion Prompt #150 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#150 */
.eclipse .mainnav a {transition:color .25s var(--im-out),background-color .25s var(--im-out);}

/* Motion Prompt #160 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#160 */
/* 点击触发的加载由 deepspace.css 的 aria-busy 转圈负责；这里只兜底按回车提交、没有 aria-busy 的情况，避免同一按钮出现两个转圈（2026-11-28） */
#dialog form button[type=submit]:disabled:not([aria-busy=true])::after {
  content:"";display:inline-block;vertical-align:-.1em;box-sizing:border-box;margin-left:7px;
  width:.9em;height:.9em;border:2px solid transparent;border-top-color:currentColor;border-right-color:currentColor;
  border-radius:50%;animation:im-spin .7s linear infinite;
}
/* Motion Prompt #163 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#163 */
.sh-title-line .sh-badge.positive::before {
  content:"";display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:6px;
  vertical-align:.1em;background:var(--ds-ice);animation:eclipse-pulse 1.57s ease-out infinite;
}

/* #074 滚动浮现：观察前先隐藏，越过 85% 触发线后由 scroll-reveal.js 播入场并移除本类。 */
.sr-hide{opacity:0;translate:0 28px}
