

:root { --stage: #e9ebee; --tabs: #dfe3e8; --omni: #f1f3f4; --cf: #fff23a; --cf-cur: #ff9632; --cf-zero: #c5221f; --find-btn: #5f6368; }
@media (prefers-color-scheme: dark) { :root { --stage: #0c0f12; --tabs: #202428; --omni: #2a2f36; --cf: #c9b400; --cf-cur: #e08a2e; --cf-zero: #f28b82; --find-btn: #9aa0a6; } }

body.try { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: var(--stage); line-height: 1.6; }
body.try .site-header { flex: none; background: var(--paper); border-bottom-color: var(--rule); }
.brand-sub { margin-left: 12px; font-size: 14px; color: var(--muted); white-space: nowrap; }
body.try .brand { text-decoration: none; }

.stage { flex: 1; min-height: 0; display: flex; align-items: flex-start; justify-content: flex-start; padding: 18px 0; overflow: auto; }
.win, .end { margin: auto; }
.win {
  display: flex; flex-direction: column; width: min(1040px, 100% - 32px); height: 100%; min-height: 300px; max-height: 760px;
  background: var(--paper); border-radius: 12px; overflow: hidden;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.tabs { flex: none; display: flex; align-items: flex-end; height: 38px; padding: 0 10px; gap: 4px; background: var(--tabs); font-size: 12.5px; color: var(--ink-soft); }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 32px; max-width: 240px; padding: 0 10px 0 12px; background: var(--paper); border-radius: 8px 8px 0 0; }
.tab-ico { flex: none; width: 14px; height: 14px; border-radius: 3px; background: var(--rule-strong); }
.tab-t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tab-x, .tab-add { flex: none; color: var(--muted); font-size: 15px; line-height: 1; }
.tab-add { padding: 0 8px 7px; }
.tool { flex: none; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.nav { display: inline-flex; gap: 14px; padding: 0 4px; color: var(--muted); font-size: 17px; }
.url { flex: 1; display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; background: var(--omni); border-radius: 14px; font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; }
.url svg { flex: none; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.menu { padding: 0 6px; color: var(--muted); font-size: 18px; }
.body { position: relative; flex: 1; min-height: 0; }
.view { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { .view { scroll-behavior: auto; } }

.try .sdoc { padding: 30px 0 180px; }
.try .sdoc-col { width: min(31em, 100% - 48px); }
.try .u { transition: background-color 0.25s; }
.try .u.is-match { --c: var(--mark); }
.try .u.is-related { --c: var(--related); }
.try .u.is-current { --c: var(--current); }

.try .u.is-new { background-color: transparent; background-image: linear-gradient(var(--c), var(--c)); background-repeat: no-repeat; background-size: 100% 100%; animation: sweep 0.5s ease-out; }
@keyframes sweep { from { background-size: 0 100%; } }
.lit.is-cf { background: var(--cf); color: #1f2328; }
.lit.is-cf-cur { background: var(--cf-cur); }
.try .lit.is-on { color: var(--ink); }

.find {
  position: absolute; top: 8px; right: 16px; z-index: 2;
  display: flex; align-items: center; width: min(360px, calc(100% - 32px)); height: 44px; padding: 0 6px 0 12px;
  background: var(--bar-bg); color: var(--ink); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.08);
  font: 400 14px/1.4 var(--font); letter-spacing: normal;
}
.find-in { flex: 1; display: flex; align-items: center; height: 30px; padding: 0 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; }
.find.is-zero .find-in { background: rgba(217, 48, 37, 0.08); }
.find-n { flex: none; min-width: 44px; padding-right: 10px; text-align: right; color: var(--bar-muted); font-variant-numeric: tabular-nums; }
.find.is-zero .find-n { color: var(--cf-zero); }
.find-div { flex: none; width: 1px; height: 22px; margin-right: 2px; background: var(--rule-strong); }
.find-b { flex: none; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; color: var(--find-btn); border-radius: 6px; }
.find-b svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.find[hidden], .bar[hidden] { display: none; }
.caret { display: inline-block; width: 1px; height: 1.15em; margin-left: 1px; background: currentColor; vertical-align: -0.2em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.try .bar { width: min(500px, calc(100% - 32px)); }
.try .bar-input { display: flex; justify-content: flex-end; align-items: center; overflow: hidden; white-space: nowrap; }
.try .bar-input > * { flex: none; }
.try .bar-status, .try .bar-remaining { flex: none; white-space: nowrap; }
.ph { color: var(--bar-muted); }
.ime { text-decoration: underline 1px; text-underline-offset: 3px; }
.conv { text-decoration: underline 2px; text-underline-offset: 3px; }
.sel { background: rgba(27, 90, 183, 0.22); }
.try .textbtn { min-height: 26px; }
.textbtn.is-press { background: rgba(27, 90, 183, 0.16); }
.try button.textbtn { cursor: pointer; }
.try button.textbtn[aria-disabled="true"] { cursor: default; opacity: 0.75; }

.keyshow {
  position: absolute; left: 18px; bottom: 18px; z-index: 4;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  font-size: 20px; font-weight: 800; color: var(--ink);
  background: var(--bar-bg); border: 1px solid var(--bar-border); border-radius: 10px; box-shadow: var(--bar-shadow);
  opacity: 0; transform: translateY(6px); transition: opacity 0.18s, transform 0.18s; pointer-events: none;
}
.keyshow.is-on { opacity: 1; transform: none; }
.keyshow kbd { font-size: 0.78em; line-height: 1.75; min-width: 2em; }
.keyshow .plus { color: var(--muted); }

.end { display: none; width: min(720px, 100% - 32px); padding: 8px 0; text-align: center; outline: none; }
.is-end .win { display: none; }
.is-end .end { display: block; }
.sum { display: grid; gap: 12px; margin: 0 0 30px; font: 800 clamp(24px, 3.6vw, 40px)/1.4 var(--font); font-feature-settings: "palt"; color: var(--ink); }
.sum .k { color: var(--muted); }
.sum .box { box-shadow: inset 0 0 0 2px var(--ink-soft); border-radius: 4px; padding: 0 0.1em; }
.sum .mk { background-image: var(--sweep); background-repeat: no-repeat; background-size: 100% 100%; text-decoration: underline 2px var(--mark-line); text-underline-offset: 6px; }
.is-end .sum .mk { animation: sweep 0.6s 0.4s ease-out both; }
.recap { list-style: none; margin: 0 auto 26px; padding: 0; display: grid; gap: 10px; justify-content: center; font-size: 15.5px; }
.recap li { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; }
.recap-cf { color: var(--muted); white-space: nowrap; }
.recap-arrow { color: var(--rule-strong); }
.recap-a { font-weight: 600; color: var(--ink); }
.end-keys { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 0 0 22px; font-size: 22px; font-weight: 800; }
.end-keys .cap { font-size: 0.72em; line-height: 1; padding: 0.24em 0.46em 0.18em; min-width: 1.6em; }
.end-keys .plus { color: var(--muted); }
.end-keys-t { margin-left: 8px; font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.end-note { max-width: 40em; margin: 0 auto; font-size: 13px; line-height: 1.7; color: var(--muted); word-break: auto-phrase; }

.band { flex: none; background: var(--paper); border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom); }
.prog { height: 3px; background: var(--rule); }
.prog i { display: block; height: 100%; width: 0; background: var(--ink); transition: width 0.4s; }
.band-in { width: min(1040px, 100% - 32px); min-height: 176px; margin: 0 auto; padding: 14px 0 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 4px 32px; align-items: center; align-content: center; }
.band { position: relative; }
.think { grid-column: 1; grid-row: 1; margin: 0; min-height: 1.45em; display: flex; align-items: center; font-size: clamp(18px, 2.1vw, 23px); }
.think[hidden] { display: none; }
.think:not([hidden]) + .say { display: none; }
.think .bubble { font-size: 18px; }
.say { grid-column: 1; margin: 0; min-height: 1.45em; font: 800 clamp(18px, 2.1vw, 23px)/1.45 var(--font); font-feature-settings: "palt"; word-break: auto-phrase; }
.said-keys { display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; font-size: 0.86em; vertical-align: 0.02em; }
.said-keys:empty { display: none; }
.said-keys .cap { animation: press 0.5s ease-out; }
@keyframes press { 0% { transform: none; } 25%, 65% { transform: translateY(0.12em); border-bottom-width: 0.1em; } 100% { transform: none; } }
.why { grid-column: 1; margin: 0; min-height: 1.65em; font-size: 15.5px; line-height: 1.65; color: var(--ink-soft); word-break: auto-phrase; }
.act { grid-column: 2; grid-row: 1 / 3; display: flex; flex-direction: column; align-items: center; gap: 6px; }

.next, .again { touch-action: manipulation; }
.next {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 260px; min-height: 58px; padding: 0 18px 0 24px;
  font: 700 17px/1.3 var(--font); letter-spacing: 0.04em; color: var(--button-fg); background: var(--button-bg);
  border: 0; border-radius: 12px; cursor: pointer; text-decoration: none; text-align: center; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.28), 0 12px 26px -14px rgba(0, 0, 0, 0.55);
  transition: transform 0.1s, box-shadow 0.1s, opacity 0.12s;
}
.next:hover { transform: translateY(-1px); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.28), 0 16px 30px -14px rgba(0, 0, 0, 0.6); }
.next:active, .next.is-down { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.28), 0 6px 14px -10px rgba(0, 0, 0, 0.5); }
.next-t { flex: 0 1 auto; }
.next-arrow { flex: none; width: 26px; height: 26px; padding: 4px; margin-left: 2px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; border-radius: 50%; background: color-mix(in srgb, var(--button-fg) 16%, transparent); transition: transform 0.15s; }
.next:hover .next-arrow { transform: translateX(2px); }
.next-keys { display: inline-flex; align-items: center; gap: 3px; opacity: 0.78; }
.next-keys:empty { display: none; }
.next-keys .cap { color: var(--button-fg); border-color: color-mix(in srgb, var(--button-fg) 70%, transparent); background: transparent; font-size: 12px; }
.next-keys .plus { color: color-mix(in srgb, var(--button-fg) 70%, transparent); margin: 0; font-size: 12px; }
.band.is-fresh .next { animation: ring 1.8s ease-out 0.8s infinite; }
@keyframes ring {
  0% { box-shadow: 0 3px 0 rgba(0, 0, 0, 0.28), 0 12px 26px -14px rgba(0, 0, 0, 0.55), 0 0 0 0 rgba(255, 200, 0, 0.6); }
  70%, 100% { box-shadow: 0 3px 0 rgba(0, 0, 0, 0.28), 0 12px 26px -14px rgba(0, 0, 0, 0.55), 0 0 0 16px rgba(255, 200, 0, 0); }
}
.again { min-height: 44px; padding: 0 12px; font-size: 14px; color: var(--muted); background: transparent; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.again:hover { color: var(--ink); }
.fin { display: none; grid-column: 1 / 3; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px 24px; }
.is-end .say, .is-end .why, .is-end .act, .is-end .think { display: none; }
.is-end .fin { display: flex; }
.terms { margin: 0; font-size: 15px; color: var(--ink-soft); }
.terms strong { color: var(--ink); white-space: nowrap; }

@media (max-width: 640px) {
  .brand-sub { display: none; }
  .stage { padding: 0; }
  .win { margin: 0; }
  .win { width: 100%; max-height: none; min-height: 240px; border-radius: 0; box-shadow: none; }
  .tabs { height: 34px; padding: 0 6px; }
  .tab { height: 29px; max-width: 70%; font-size: 12px; }
  .tool { height: 38px; }
  .nav { gap: 10px; font-size: 16px; }
  .try .sdoc { padding: 24px 0 140px; transition: padding-top 0.25s; }
  .view.has-find .sdoc { padding-top: 66px; }
  .view.has-bar .sdoc { padding-top: 124px; }
  
  .view.has-results .bar-note { display: none; }
  .try .sdoc-col { width: auto; margin: 0 16px; font-size: 15px; line-height: 1.85; }
  .find { top: -1px; left: 0; right: 0; width: 100%; border-radius: 0; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14); }
  
  .try .bar { top: -1px; left: 0; right: 0; width: 100%; border-radius: 0; border-width: 0 0 1px; font-size: 14px; }
  .try .bar-row { flex-wrap: wrap; height: auto; }
  .try .bar-label { flex: 0 0 52px; min-width: 0; padding: 0; }
  .try .bar-input { display: block; flex: 1 1 calc(100% - 52px); line-height: 1.5; padding: 12px 8px; white-space: normal; overflow: visible; }
  .try .bar-sub { padding: 5px 12px 7px; }
  .try .bar-status { margin-left: auto; min-width: 0; line-height: 34px; padding-right: 6px; }
  .try .bar-remaining { line-height: 34px; }
  .try .bar-btn { height: 34px; width: 28px; }
  .try .bar-divider, .try .bar-close, .try .bar-note .textbtn { display: none; }
  .try .textbtn { min-height: 32px; display: inline-flex; align-items: center; }
  .keyshow { left: 12px; bottom: 12px; padding: 6px 12px; font-size: 17px; }
  .band-in { width: calc(100% - 32px); min-height: 0; padding: 10px 0 12px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; gap: 4px; }
  .think { grid-row: auto; min-height: 2.9em; font-size: 17px; }
  .think .bubble { font-size: 16px; }
  .say { font-size: 17px; min-height: 2.9em; }
  .said-keys { font-size: 0.9em; margin-right: 8px; }
  .why { font-size: 15px; min-height: 3.3em; }
  
  .act { grid-column: 1; grid-row: auto; flex-direction: row; align-items: stretch; width: 100%; margin-top: 6px; gap: 10px; }
  .next { flex: 1 1 auto; width: auto; min-width: 0; min-height: 56px; padding: 0 12px 0 16px; }
  .act .again { order: -1; flex: none; min-height: 56px; margin: 0; padding: 0 12px; font-size: 13px; color: var(--ink-soft); text-decoration: none; border: 1.5px solid var(--rule-strong); border-radius: 12px; }
  .end { padding: 24px 16px 28px; }
  .sum { gap: 8px; margin-bottom: 22px; }
  .recap { font-size: 14.5px; gap: 8px; margin-bottom: 20px; }
  .end-keys { font-size: 20px; margin-bottom: 16px; }
  .fin { grid-column: 1; flex-direction: column; align-items: stretch; gap: 8px; }
  .fin .next { width: 100%; }
  .fin .terms, .fin .again { text-align: center; }
}
@media (max-height: 600px) and (min-width: 641px) { .stage { padding: 10px 24px; } .band-in { padding: 10px 0 12px; } .next { min-height: 48px; } }

@media (max-height: 600px) and (max-width: 640px) {
  .think, .say { min-height: 2.9em; }
  
  .why { display: none; }
  .end { padding: 10px 16px 14px; }
  .sum { font-size: 21px; gap: 4px; margin-bottom: 12px; }
  .recap { margin-bottom: 10px; gap: 4px; }
  .end-keys { margin-bottom: 10px; }
  .end-note { font-size: 12px; }
}

@media (max-height: 500px) {
  .stage { padding: 0; }
  .win { margin: 0; min-height: 0; max-height: none; border-radius: 0; box-shadow: none; }
  .tabs { display: none; }
  .try .sdoc { padding: 20px 0 120px; }
  .view.has-find .sdoc { padding-top: 60px; }
  .view.has-bar .sdoc { padding-top: 100px; }
  .view.has-results .bar-note { display: none; }
  .find { top: -1px; left: 0; right: 0; width: 100%; border-radius: 0; }
  .try .bar { top: -1px; left: 0; right: 0; width: 100%; border-radius: 0; border-width: 0 0 1px; }
  .try .bar-row { height: 40px; }
  .try .bar-input { line-height: 40px; }
  .try .bar-sub { padding: 3px 12px 5px; }
  .try .sdoc-col { width: min(44em, 100% - 32px); margin-left: 16px; font-size: 14px; line-height: 1.7; }
  .band-in { min-height: 0; padding: 6px 0 8px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 0 16px; }
  .think, .say { min-height: 0; font-size: 15px; }
  .why { min-height: 0; font-size: 12.5px; line-height: 1.4; }
  .act { grid-column: 2; grid-row: 1 / 3; }
  .next { min-height: 44px; min-width: 0; padding: 0 16px; font-size: 14px; }
  .act .again { order: 0; min-height: 28px; font-size: 12px; }
  .end { padding: 8px 16px; }
  .sum { font-size: 20px; gap: 2px; margin-bottom: 8px; }
  .recap { font-size: 13px; gap: 2px; margin-bottom: 8px; }
  .end-keys { font-size: 16px; margin-bottom: 6px; }
  .end-note { font-size: 11.5px; }
}
@media (forced-colors: active) {
  .lit.is-cf { forced-color-adjust: none; background: Mark; color: MarkText; }
  .lit.is-cf-cur { forced-color-adjust: none; background: Highlight; color: HighlightText; }
}
