.ytec-sagi-wp-plugin {
  --ytec-bg: #061423;
  --ytec-panel: #091724;
  --ytec-panel-2: #10263a;
  --ytec-panel-3: rgba(7, 18, 29, 0.9);
  --ytec-line: #2b88b6;
  --ytec-line-soft: rgba(102, 215, 255, 0.42);
  --ytec-cyan: #88f7ff;
  --ytec-yellow: #ffd84d;
  --ytec-cream: #fff3bd;
  --ytec-white: #f8fbff;
  --ytec-muted: #bad1df;
  --ytec-danger: #8f2444;
  --ytec-shadow: rgba(0, 0, 0, 0.45);
  color: var(--ytec-white);
  font-family: "LINE Seed JP", "Yu Gothic", "Meiryo", sans-serif;
  line-height: 1.7;
}

.ytec-sagi-wp-plugin,
.ytec-sagi-wp-plugin * {
  box-sizing: border-box;
}

.ytec-sagi-wp-plugin img {
  display: block;
  max-width: 100%;
  height: auto;
}

.ytec-sagi-page {
  min-height: 100%;
  padding: clamp(10px, 2vw, 24px);
  background:
    linear-gradient(90deg, rgba(49, 167, 209, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(49, 167, 209, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 10% 8%, rgba(68, 216, 255, 0.18), transparent 34%),
    radial-gradient(circle at 88% 92%, rgba(255, 216, 77, 0.12), transparent 28%),
    var(--ytec-bg);
  background-size: 24px 24px, 24px 24px, auto, auto, auto;
}

.ytec-sagi-game {
  container-type: inline-size;
  width: min(100%, 1160px);
  margin: 0 auto;
}

.ytec-sagi-game:fullscreen,
.ytec-sagi-game.ytec-sagi-faux-fullscreen {
  width: 100%;
  height: 100dvh;
  max-width: none;
  padding: clamp(6px, 1.2vw, 14px);
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(49, 167, 209, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(49, 167, 209, 0.1) 1px, transparent 1px),
    #061423;
  background-size: 24px 24px;
}

.ytec-sagi-game.ytec-sagi-faux-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  width: 100vw;
  max-width: none;
  margin: 0;
}

html.ytec-sagi-faux-fullscreen-active,
body.ytec-sagi-faux-fullscreen-active {
  overflow: hidden;
}

.ytec-sagi-card {
  position: relative;
  display: grid;
  gap: clamp(6px, 1cqi, 10px);
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: clamp(8px, 1.2cqi, 14px);
  border: 3px solid #0a0f18;
  outline: 4px solid var(--ytec-yellow);
  outline-offset: -7px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    rgba(13, 32, 47, 0.96);
  background-size: 6px 6px, 6px 6px, auto;
  box-shadow: 10px 12px 0 rgba(0, 0, 0, 0.3);
  overflow: visible;
}

.ytec-sagi-game:fullscreen .ytec-sagi-card,
.ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-card {
  max-width: min(1120px, calc(100vw - 16px));
}

.ytec-sagi-heading {
  margin: 0;
  color: var(--ytec-white);
  font-size: clamp(1.55rem, 3.2cqi, 2.65rem);
  line-height: 1.18;
  letter-spacing: 0;
  text-shadow: 3px 3px 0 #263746;
  overflow-wrap: anywhere;
}

.ytec-sagi-heading:focus {
  outline: none;
}

.ytec-sagi-kicker,
.ytec-sagi-console-label,
.ytec-sagi-series-label,
.ytec-sagi-stage-number {
  margin: 0;
  color: var(--ytec-cyan);
  font-size: clamp(0.92rem, 1.35cqi, 1.08rem);
  overflow-wrap: anywhere;
}

.ytec-sagi-console-label,
.ytec-sagi-panel-title,
.ytec-sagi-vn-message-title,
.ytec-sagi-vn-command-title,
.ytec-sagi-subheading {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  margin: 0;
  padding: 0.18rem 0.62rem;
  border-left: 4px solid var(--ytec-yellow);
  background: linear-gradient(90deg, #0f4b80, #124672);
  color: var(--ytec-white);
  font-size: clamp(0.96rem, 1.55cqi, 1.18rem);
  line-height: 1.2;
  letter-spacing: 0;
}

.ytec-sagi-card p,
.ytec-sagi-card li {
  font-size: clamp(0.95rem, 1.4cqi, 1.08rem);
  overflow-wrap: anywhere;
}

.ytec-sagi-card p {
  margin: 0;
}

.ytec-sagi-card ul,
.ytec-sagi-card ol {
  margin-block: 0;
  padding-left: 1.35em;
}

.ytec-sagi-title-card,
.ytec-sagi-stage-intro,
.ytec-sagi-readable-card {
  max-width: 1040px;
}

.ytec-sagi-title-card {
  gap: clamp(6px, 0.9cqi, 9px);
  padding: clamp(8px, 1.05cqi, 12px);
}

.ytec-sagi-game:fullscreen .ytec-sagi-title-card,
.ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-title-card {
  height: auto;
  max-height: calc(100dvh - 16px);
  min-height: 0;
  gap: clamp(6px, 0.9cqi, 10px);
  padding: clamp(8px, 1.05cqi, 12px);
  overflow: visible;
}

.ytec-sagi-title-header {
  display: grid;
  justify-items: center;
  gap: 0.18rem;
  text-align: center;
}

.ytec-sagi-title-card .ytec-sagi-console-label {
  min-height: 24px;
  padding: 0.12rem 0.52rem;
  font-size: clamp(0.82rem, 1.05cqi, 0.95rem);
}

.ytec-sagi-title-card .ytec-sagi-series-label {
  font-size: clamp(0.86rem, 1.08cqi, 0.98rem);
}

.ytec-sagi-title-card .ytec-sagi-heading {
  font-size: clamp(1.32rem, 2.45cqi, 2rem);
  line-height: 1.06;
}

.ytec-sagi-title-layout,
.ytec-sagi-play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(8px, 1.25cqi, 14px);
  align-items: start;
}

.ytec-sagi-game:fullscreen .ytec-sagi-title-layout,
.ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-title-layout {
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.82fr);
  align-items: stretch;
}

.ytec-sagi-title-layout-single,
.ytec-sagi-game:fullscreen .ytec-sagi-title-layout-single,
.ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-title-layout-single {
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
}

.ytec-sagi-title-visual,
.ytec-sagi-title-command-panel,
.ytec-sagi-mode-panel,
.ytec-sagi-stage-card,
.ytec-sagi-highlight,
.ytec-sagi-result,
.ytec-sagi-advice,
.ytec-sagi-review,
.ytec-sagi-consult {
  min-width: 0;
  padding: clamp(8px, 1.1cqi, 12px);
  border: 2px solid #06101a;
  background: rgba(5, 17, 27, 0.86);
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.28);
}

.ytec-sagi-title-image-frame,
.ytec-sagi-mode-image-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  margin-top: 6px;
  border: 3px solid var(--ytec-line);
  background: #020a12;
  overflow: hidden;
}

.ytec-sagi-title-image-frame {
  aspect-ratio: 4 / 3;
  max-height: min(30dvh, 230px);
}

.ytec-sagi-game:fullscreen .ytec-sagi-title-image-frame,
.ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-title-image-frame {
  max-height: min(32dvh, 250px);
}

.ytec-sagi-title-layout-single .ytec-sagi-title-image-frame {
  aspect-ratio: 16 / 5;
  max-height: none;
}

.ytec-sagi-game:fullscreen .ytec-sagi-title-layout-single .ytec-sagi-title-image-frame,
.ytec-sagi-game.ytec-sagi-is-fullscreen .ytec-sagi-title-layout-single .ytec-sagi-title-image-frame,
.ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-title-layout-single .ytec-sagi-title-image-frame {
  aspect-ratio: 16 / 5;
  max-height: none;
}

.ytec-sagi-mode-image-frame {
  aspect-ratio: 4 / 3;
}

.ytec-sagi-mode-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020a12;
}

.ytec-sagi-wp-plugin .ytec-sagi-title-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #020a12;
}

.ytec-sagi-vn-caption,
.ytec-sagi-scene-caption,
.ytec-sagi-mascot-label {
  margin-top: 0.25rem;
  color: var(--ytec-cyan);
  text-align: center;
  font-size: clamp(0.92rem, 1.35cqi, 1.05rem);
}

.ytec-sagi-mascot-wrap {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
}

.ytec-sagi-mascot {
  width: clamp(76px, 12cqi, 112px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 3px solid #07111b;
  background: #0d2030;
}

.ytec-sagi-mascot-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ytec-sagi-title-intro {
  display: grid;
  gap: 0.28rem;
  margin-top: 0.5rem;
  text-align: center;
}

.ytec-sagi-title-intro-label {
  color: var(--ytec-cyan);
  font-size: clamp(1rem, 1.45cqi, 1.18rem);
  font-weight: 700;
}

.ytec-sagi-title-intro .ytec-sagi-lead {
  max-width: 760px;
  margin-inline: auto;
}

.ytec-sagi-actions,
.ytec-sagi-vn-actions,
.ytec-sagi-dialogue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.ytec-sagi-button,
.ytec-sagi-choice,
.ytec-sagi-display-preset-button,
.ytec-sagi-mute-button,
.ytec-sagi-settings-summary {
  min-height: 42px;
  border: 2px solid #02060a;
  border-radius: 4px;
  background: linear-gradient(180deg, #1f405e, #12273a);
  color: var(--ytec-white);
  font: inherit;
  font-size: clamp(0.92rem, 1.25cqi, 1.05rem);
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.45);
  overflow-wrap: anywhere;
}

.ytec-sagi-button,
.ytec-sagi-choice {
  padding: 0.58rem 0.9rem;
}

.ytec-sagi-button-primary {
  background: linear-gradient(180deg, #09c9d8, #087e93);
}

.ytec-sagi-button-secondary {
  background: linear-gradient(180deg, #2f526f, #20394f);
}

.ytec-sagi-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ytec-sagi-settings {
  position: absolute;
  top: clamp(10px, 1.4cqi, 16px);
  right: clamp(10px, 1.4cqi, 16px);
  z-index: 40;
}

.ytec-sagi-settings-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 36px;
  list-style: none;
  padding: 0.35rem 0.75rem;
  background: linear-gradient(180deg, #ffd84d, #d99c1d);
  color: #111821;
}

.ytec-sagi-settings-summary::-webkit-details-marker {
  display: none;
}

.ytec-sagi-audio-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: grid;
  gap: 10px;
  width: min(520px, calc(100vw - 34px));
  padding: 12px;
  border: 3px solid #06101a;
  background: rgba(4, 14, 23, 0.98);
  box-shadow: 10px 12px 0 rgba(0, 0, 0, 0.38);
}

.ytec-sagi-settings:not([open]) > .ytec-sagi-audio-panel {
  display: none;
}

.ytec-sagi-audio-title {
  margin: 0;
  color: var(--ytec-cyan);
  font-size: 1rem;
}

.ytec-sagi-audio-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 240px) auto auto;
  gap: 8px;
  align-items: center;
  justify-content: end;
  min-width: 0;
  padding: 8px;
  border: 2px solid rgba(117, 243, 255, 0.36);
  background: rgba(2, 10, 18, 0.72);
}

.ytec-sagi-display-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.ytec-sagi-audio-label,
.ytec-sagi-display-label,
.ytec-sagi-audio-value {
  color: var(--ytec-cyan);
  font-size: 0.9rem;
  white-space: nowrap;
}

.ytec-sagi-audio-slider {
  --ytec-volume-fill: 50%;
  appearance: none;
  width: min(240px, 42vw);
  min-width: 0;
  height: 20px;
  border: 2px solid #101820;
  border-radius: 3px;
  background:
    linear-gradient(90deg, #ffd84d 0%, #ffd84d var(--ytec-volume-fill), #e8edf1 var(--ytec-volume-fill), #e8edf1 100%);
  box-shadow: inset 0 0 0 2px rgba(2, 10, 18, 0.35);
  cursor: pointer;
}

.ytec-sagi-audio-slider::-webkit-slider-runnable-track {
  height: 20px;
  border-radius: 3px;
  background: transparent;
}

.ytec-sagi-audio-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 26px;
  margin-top: -5px;
  border: 2px solid #07111b;
  border-radius: 3px;
  background: linear-gradient(180deg, #f7fbff, #8c99a3);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.ytec-sagi-audio-slider::-moz-range-track {
  height: 20px;
  border-radius: 3px;
  background: transparent;
}

.ytec-sagi-audio-slider::-moz-range-progress {
  height: 20px;
  border-radius: 3px;
  background: #ffd84d;
}

.ytec-sagi-audio-slider::-moz-range-thumb {
  width: 16px;
  height: 26px;
  border: 2px solid #07111b;
  border-radius: 3px;
  background: linear-gradient(180deg, #f7fbff, #8c99a3);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.ytec-sagi-mute-button,
.ytec-sagi-display-preset-button {
  min-height: 34px;
  padding: 0.32rem 0.6rem;
  font-size: 0.86rem;
}

.ytec-sagi-mute-button[aria-pressed="true"] {
  background: linear-gradient(180deg, #a23052, #6e1933);
}

.ytec-sagi-progress {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 34px;
  padding: 4px 90px 4px 7px;
  border: 2px solid #06101a;
  background: rgba(4, 14, 23, 0.94);
}

.ytec-sagi-progress-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
}

.ytec-sagi-progress-item {
  display: grid;
  place-items: center;
  width: clamp(24px, 2.6cqi, 30px);
  min-width: clamp(24px, 2.6cqi, 30px);
  aspect-ratio: 1;
  border: 2px solid #02060a;
  border-radius: 3px;
  background: #07121d;
  color: var(--ytec-cream);
  font-weight: 700;
}

.ytec-sagi-progress-item-current {
  background: #00c8d5;
  color: #051018;
}

.ytec-sagi-progress-item-done {
  background: #244b67;
}

.ytec-sagi-progress-text {
  flex: 0 0 auto;
  color: var(--ytec-muted);
  font-weight: 700;
}

.ytec-sagi-vn-topline {
  display: grid;
  gap: 0.12rem;
  padding-right: 84px;
}

.ytec-sagi-vn-b-screen {
  min-height: auto;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: visible;
}

.ytec-sagi-game:fullscreen .ytec-sagi-vn-b-screen,
.ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-vn-b-screen {
  min-height: auto;
  max-height: calc(100dvh - 16px);
  overflow: hidden;
}

.ytec-sagi-vn-b-screen .ytec-sagi-heading {
  font-size: clamp(1.04rem, 1.7cqi, 1.42rem);
  line-height: 1.04;
}

.ytec-sagi-vn-b-screen .ytec-sagi-kicker {
  font-size: clamp(0.74rem, 0.95cqi, 0.86rem);
}

.ytec-sagi-vn-b-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(190px, 0.42fr);
  grid-template-areas:
    "scene status"
    "message message";
  gap: clamp(5px, 0.75cqi, 7px);
  min-height: 0;
  align-content: start;
  overflow: visible;
  border: 2px solid var(--ytec-line);
  padding: clamp(5px, 0.75cqi, 7px);
  background: #020a12;
  box-shadow: inset 0 0 0 1px rgba(255, 216, 77, 0.35);
}

.ytec-sagi-vn-scene {
  grid-area: scene;
  position: relative;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border: 2px solid rgba(117, 243, 255, 0.75);
  background: #05101b;
}

.ytec-sagi-vn-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 12, 20, 0.08) 0%, rgba(4, 12, 20, 0.18) 48%, rgba(4, 12, 20, 0.55) 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.035) 1px, transparent 1px, transparent 4px);
  pointer-events: none;
  z-index: 3;
}

.ytec-sagi-vn-scene-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.34;
  filter: blur(8px) saturate(0.92) brightness(0.75);
  transform: scale(1.06);
  pointer-events: none;
  z-index: 0;
}

.ytec-sagi-vn-scene-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 6.9;
  object-fit: contain;
  object-position: center;
  display: block;
}

.ytec-sagi-vn-caption {
  position: static;
  z-index: 2;
  display: none;
  margin: 0;
  padding: 0.1rem 0.36rem;
  color: var(--ytec-cyan);
  background: rgba(2, 10, 18, 0.94);
  text-align: left;
  text-shadow: 2px 2px 0 #061423;
}

.ytec-sagi-vn-status {
  grid-area: status;
  position: static;
  z-index: 5;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 4px;
  align-self: start;
  pointer-events: none;
  border: 2px solid rgba(117, 243, 255, 0.48);
  padding: clamp(5px, 0.75cqi, 7px);
  background: rgba(4, 15, 25, 0.9);
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.28);
}

.ytec-sagi-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0.08rem 0.36rem;
  border: 2px solid rgba(117, 243, 255, 0.46);
  background: rgba(3, 12, 20, 0.75);
  color: var(--ytec-white);
  font-size: clamp(0.72rem, 0.92cqi, 0.84rem);
}

.ytec-sagi-vn-message-panel {
  grid-area: message;
  position: static;
  z-index: 10;
  display: grid;
  gap: 4px;
  max-height: none;
  padding: clamp(5px, 0.7cqi, 7px);
  border: 2px solid rgba(255, 216, 77, 0.9);
  background: rgba(4, 15, 25, 0.92);
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.35);
  overflow: visible;
  scrollbar-color: var(--ytec-line) rgba(0, 0, 0, 0.25);
}

.ytec-sagi-vn-message-panel-ready {
  grid-template-columns: minmax(0, 0.35fr) minmax(360px, 0.65fr);
  grid-template-areas:
    "message-title command"
    "message-text command";
  align-items: start;
  max-height: none;
  overflow: visible;
}

.ytec-sagi-vn-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.ytec-sagi-vn-message-panel-ready .ytec-sagi-vn-message-header {
  grid-area: message-title;
}

.ytec-sagi-vn-message-title,
.ytec-sagi-vn-command-title {
  min-height: 22px;
  padding-block: 0.12rem;
  font-size: clamp(0.78rem, 0.95cqi, 0.9rem);
}

.ytec-sagi-vn-message-count {
  flex: 0 0 auto;
  color: var(--ytec-muted);
  font-weight: 700;
  font-size: 0.88rem;
}

.ytec-sagi-scroll-text {
  overflow: auto;
  padding-right: 0.25rem;
  scrollbar-color: var(--ytec-line) rgba(0, 0, 0, 0.25);
}

.ytec-sagi-vn-message-text {
  display: grid;
  gap: 0.16rem;
  max-height: min(9dvh, 60px);
  line-height: 1.34;
}

.ytec-sagi-vn-message-panel-ready .ytec-sagi-vn-message-text {
  grid-area: message-text;
  max-height: min(10dvh, 68px);
}

.ytec-sagi-vn-message-panel-ready .ytec-sagi-vn-actions {
  justify-content: flex-end;
}

.ytec-sagi-command-locked,
.ytec-sagi-positive {
  color: var(--ytec-yellow);
}

.ytec-sagi-vn-command {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ytec-sagi-vn-message-panel-ready .ytec-sagi-vn-command {
  grid-area: command;
  min-height: 0;
  max-height: 100%;
  overflow: visible;
  padding-right: 0.2rem;
}

.ytec-sagi-choices,
.ytec-sagi-vn-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.ytec-sagi-vn-message-panel-ready .ytec-sagi-vn-choices {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.ytec-sagi-choice {
  width: 100%;
  min-height: 28px;
  padding: 0.18rem 0.4rem;
  text-align: left;
  background: linear-gradient(180deg, #20364e, #142639);
  font-size: clamp(0.78rem, 1cqi, 0.9rem);
  line-height: 1.24;
}

.ytec-sagi-mode-grid,
.ytec-sagi-stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 14px;
}

.ytec-sagi-mode-panel,
.ytec-sagi-stage-card {
  display: grid;
  gap: 8px;
}

.ytec-sagi-mode-card {
  gap: 8px;
}

.ytec-sagi-mode-card .ytec-sagi-mode-image-frame {
  aspect-ratio: 1870 / 841;
  margin-top: 0;
  max-height: min(23dvh, 168px);
}

.ytec-sagi-mode-card .ytec-sagi-mode-image {
  display: block;
  object-fit: contain;
  object-position: center;
}

.ytec-sagi-mode-card .ytec-sagi-button {
  min-height: 34px;
  padding-block: 0.28rem;
}

.ytec-sagi-mode-title,
.ytec-sagi-stage-card-title {
  margin: 0;
  color: var(--ytec-yellow);
  font-size: clamp(1.08rem, 1.8cqi, 1.3rem);
}

.ytec-sagi-mode-subtitle,
.ytec-sagi-mode-status,
.ytec-sagi-stage-description {
  margin: 0;
}

.ytec-sagi-mode-panel-locked {
  opacity: 0.72;
}

.ytec-sagi-stage-carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.ytec-sagi-stage-arrow {
  align-self: center;
  min-width: 42px;
  min-height: 42px;
}

.ytec-sagi-stage-card-current {
  min-width: 0;
}

.ytec-sagi-stage-select-card {
  gap: 8px;
  padding: clamp(8px, 1.05cqi, 12px);
}

.ytec-sagi-stage-select-card .ytec-sagi-console-label {
  min-height: 24px;
  padding-block: 0.12rem;
}

.ytec-sagi-stage-select-card .ytec-sagi-heading {
  font-size: clamp(1.25rem, 2.25cqi, 1.8rem);
  line-height: 1.05;
}

.ytec-sagi-stage-select-card .ytec-sagi-lead {
  font-size: clamp(0.86rem, 1.2cqi, 0.98rem);
}

.ytec-sagi-stage-panel-current {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  grid-template-areas:
    "image status"
    "image title"
    "image subtitle"
    "image counter"
    "image action";
  gap: 6px 12px;
  align-items: center;
}

.ytec-sagi-stage-panel-current > .ytec-sagi-mode-image-frame {
  grid-area: image;
  align-self: stretch;
  margin-top: 0;
  aspect-ratio: 16 / 9;
  max-height: min(25dvh, 185px);
}

.ytec-sagi-stage-panel-current > .ytec-sagi-mode-status {
  grid-area: status;
  font-size: clamp(0.78rem, 1cqi, 0.9rem);
}

.ytec-sagi-stage-panel-current > .ytec-sagi-mode-title {
  grid-area: title;
  font-size: clamp(1rem, 1.45cqi, 1.18rem);
  line-height: 1.15;
}

.ytec-sagi-stage-panel-current > .ytec-sagi-mode-subtitle {
  grid-area: subtitle;
  font-size: clamp(0.82rem, 1.05cqi, 0.96rem);
  line-height: 1.38;
}

.ytec-sagi-stage-panel-current > .ytec-sagi-stage-counter {
  grid-area: counter;
  font-size: clamp(0.8rem, 1cqi, 0.92rem);
}

.ytec-sagi-stage-panel-current > .ytec-sagi-button {
  grid-area: action;
  justify-self: start;
}

.ytec-sagi-result,
.ytec-sagi-highlight,
.ytec-sagi-advice,
.ytec-sagi-review,
.ytec-sagi-consult,
.ytec-sagi-summary,
.ytec-sagi-notice {
  display: grid;
  gap: 0.65rem;
}

.ytec-sagi-result-correct {
  border-color: rgba(117, 243, 255, 0.72);
}

.ytec-sagi-result-careful {
  border-color: rgba(255, 216, 77, 0.86);
}

.ytec-sagi-final-score,
.ytec-sagi-rank {
  color: var(--ytec-yellow);
  font-size: clamp(1.12rem, 2cqi, 1.38rem);
  font-weight: 700;
}

.ytec-sagi-consult-grid,
.ytec-sagi-consult-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 10px;
}

.ytec-sagi-consult-card {
  padding: 12px;
  border: 2px solid #06101a;
  background: var(--ytec-cream);
  color: #17202a;
}

.ytec-sagi-consult-number {
  font-size: clamp(1.55rem, 3.4cqi, 2.25rem);
  font-weight: 700;
  line-height: 1.1;
}

.ytec-sagi-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.ytec-sagi-wp-message {
  padding: 1rem;
  border: 1px solid #d0d7de;
  background: #fff;
  color: #24292f;
}

@container (max-width: 880px) {
  .ytec-sagi-title-layout {
    grid-template-columns: minmax(0, 1fr) minmax(210px, 0.66fr);
    gap: 8px;
  }

  .ytec-sagi-title-layout-single {
    grid-template-columns: minmax(0, 1fr);
  }

  .ytec-sagi-title-image-frame {
    max-height: min(28dvh, 210px);
  }

  .ytec-sagi-title-layout-single .ytec-sagi-title-image-frame {
    max-height: none;
  }

  .ytec-sagi-title-command-panel .ytec-sagi-lead {
    font-size: clamp(0.78rem, 1cqi, 0.9rem);
    line-height: 1.35;
  }

  .ytec-sagi-play-layout {
    grid-template-columns: 1fr;
  }

  .ytec-sagi-title-command-panel {
    order: initial;
  }

  .ytec-sagi-vn-b-screen {
    min-height: 0;
  }
}

@container (max-width: 680px) {
  .ytec-sagi-title-layout {
    grid-template-columns: 1fr;
  }

  .ytec-sagi-title-layout-single {
    grid-template-columns: 1fr;
  }

  .ytec-sagi-title-command-panel {
    order: 2;
  }

  .ytec-sagi-card {
    padding: 12px;
    outline-width: 3px;
    outline-offset: -7px;
    box-shadow: 8px 10px 0 rgba(0, 0, 0, 0.3);
  }

  .ytec-sagi-settings {
    top: 10px;
    right: 10px;
  }

  .ytec-sagi-audio-panel {
    width: min(420px, calc(100vw - 28px));
  }

  .ytec-sagi-audio-row {
    grid-template-columns: auto minmax(94px, 1fr) auto;
  }

  .ytec-sagi-audio-row .ytec-sagi-mute-button {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .ytec-sagi-progress {
    padding-right: 86px;
  }

  .ytec-sagi-vn-b-screen {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .ytec-sagi-stage-panel-current {
    grid-template-columns: 1fr;
    grid-template-areas:
      "image"
      "status"
      "title"
      "subtitle"
      "counter"
      "action";
  }

  .ytec-sagi-stage-panel-current > .ytec-sagi-mode-image-frame {
    max-height: min(30dvh, 190px);
  }

  .ytec-sagi-vn-b-stage {
    grid-template-columns: 1fr;
    grid-template-areas:
      "scene"
      "status"
      "message";
    min-height: 0;
  }

  .ytec-sagi-vn-status {
    flex-direction: row;
    align-items: flex-start;
  }

  .ytec-sagi-vn-message-panel {
    max-height: none;
  }

  .ytec-sagi-vn-message-panel-ready {
    grid-template-columns: 1fr;
    grid-template-areas:
      "message-title"
      "message-text"
      "command";
    max-height: none;
  }

  .ytec-sagi-vn-message-text {
    max-height: 12dvh;
  }

  .ytec-sagi-vn-message-panel-ready .ytec-sagi-vn-message-text {
    max-height: 10dvh;
  }

  .ytec-sagi-choices,
  .ytec-sagi-vn-choices {
    grid-template-columns: 1fr;
  }

  .ytec-sagi-stage-carousel {
    grid-template-columns: 1fr;
  }

  .ytec-sagi-stage-arrow {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .ytec-sagi-page {
    padding: 8px;
    overflow-x: hidden;
  }

  .ytec-sagi-game {
    width: 100%;
    max-width: 100%;
  }

  .ytec-sagi-card {
    gap: 8px;
    padding: 10px;
    border-width: 2px;
    outline-width: 2px;
    outline-offset: -5px;
    box-shadow: none;
  }

  .ytec-sagi-settings {
    position: static;
    justify-self: end;
    z-index: 3;
  }

  .ytec-sagi-settings-summary {
    min-height: 34px;
    padding: 0.28rem 0.48rem;
    font-size: 0.82rem;
  }

  .ytec-sagi-audio-panel {
    right: 0;
    width: min(320px, calc(100vw - 28px));
    max-height: 68dvh;
    overflow: auto;
  }

  .ytec-sagi-progress {
    gap: 6px;
    padding: 6px;
    min-width: 0;
  }

  .ytec-sagi-progress-list {
    min-width: 0;
    overflow-x: auto;
  }

  .ytec-sagi-progress-item {
    width: 24px;
    min-width: 24px;
    height: 26px;
    font-size: 0.84rem;
  }

  .ytec-sagi-progress-text {
    font-size: 0.88rem;
  }

  .ytec-sagi-vn-topline {
    padding-right: 0;
  }

  .ytec-sagi-vn-b-screen .ytec-sagi-heading {
    font-size: clamp(1.2rem, 7.2vw, 1.65rem);
    word-break: break-all;
    line-break: anywhere;
  }

  .ytec-sagi-vn-b-stage {
    min-height: 0;
    border-width: 2px;
  }

  .ytec-sagi-vn-status {
    gap: 5px;
  }

  .ytec-sagi-status-chip {
    padding: 0.12rem 0.32rem;
    font-size: 0.72rem;
  }

  .ytec-sagi-vn-scene-caption {
    font-size: 0.86rem;
  }

  .ytec-sagi-vn-message-panel {
    gap: 7px;
    max-height: none;
    padding: 8px;
  }

  .ytec-sagi-vn-message-panel-ready {
    max-height: none;
  }

  .ytec-sagi-vn-message-header {
    gap: 6px;
    align-items: flex-start;
  }

  .ytec-sagi-vn-message-title {
    min-height: 24px;
    font-size: 0.86rem;
  }

  .ytec-sagi-vn-message-count {
    font-size: 0.76rem;
  }

  .ytec-sagi-vn-message-text {
    max-height: 14dvh;
    word-break: break-all;
    line-break: anywhere;
  }

  .ytec-sagi-vn-message-panel-ready .ytec-sagi-vn-message-text {
    max-height: 9dvh;
  }

  .ytec-sagi-vn-actions {
    grid-template-columns: 1fr;
  }

  .ytec-sagi-vn-choices {
    gap: 6px;
  }

  .ytec-sagi-button,
  .ytec-sagi-choice {
    width: 100%;
    min-height: 36px;
    padding: 0.42rem 0.58rem;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
    line-break: anywhere;
  }
}

@container (max-width: 480px) {
  .ytec-sagi-card {
    gap: 8px;
    padding: 10px;
    border-width: 2px;
    outline-width: 2px;
    outline-offset: -5px;
    box-shadow: none;
  }

  .ytec-sagi-settings {
    position: static;
    justify-self: start;
    z-index: 3;
  }

  .ytec-sagi-settings-summary {
    min-height: 34px;
    padding: 0.28rem 0.48rem;
    font-size: 0.82rem;
  }

  .ytec-sagi-audio-panel {
    left: 0;
    right: auto;
    width: min(320px, calc(100vw - 28px));
    max-height: 68dvh;
    overflow: auto;
  }

  .ytec-sagi-progress {
    gap: 6px;
    padding: 6px;
    min-width: 0;
  }

  .ytec-sagi-progress-list {
    min-width: 0;
    overflow-x: auto;
  }

  .ytec-sagi-progress-item {
    width: 24px;
    min-width: 24px;
    height: 26px;
    font-size: 0.84rem;
  }

  .ytec-sagi-progress-text {
    font-size: 0.88rem;
  }

  .ytec-sagi-vn-topline {
    padding-right: 0;
  }

  .ytec-sagi-vn-b-screen .ytec-sagi-heading {
    font-size: clamp(1.2rem, 7.2vw, 1.65rem);
    word-break: break-all;
    line-break: anywhere;
  }

  .ytec-sagi-vn-b-stage {
    min-height: 0;
    border-width: 2px;
  }

  .ytec-sagi-vn-status {
    gap: 5px;
  }

  .ytec-sagi-status-chip {
    min-height: 26px;
    padding: 0.12rem 0.32rem;
    font-size: 0.72rem;
  }

  .ytec-sagi-vn-scene-caption {
    font-size: 0.86rem;
  }

  .ytec-sagi-vn-message-panel {
    gap: 7px;
    max-height: none;
    padding: 8px;
  }

  .ytec-sagi-vn-message-panel-ready {
    max-height: none;
  }

  .ytec-sagi-vn-message-header {
    gap: 6px;
    align-items: flex-start;
  }

  .ytec-sagi-vn-message-title {
    min-height: 24px;
    font-size: 0.86rem;
  }

  .ytec-sagi-vn-message-count {
    font-size: 0.76rem;
  }

  .ytec-sagi-vn-message-text {
    max-height: 14dvh;
    word-break: break-all;
    line-break: anywhere;
  }

  .ytec-sagi-vn-message-panel-ready .ytec-sagi-vn-message-text {
    max-height: 9dvh;
  }

  .ytec-sagi-vn-actions,
  .ytec-sagi-vn-choices {
    grid-template-columns: 1fr;
  }

  .ytec-sagi-vn-choices {
    gap: 6px;
  }

  .ytec-sagi-button,
  .ytec-sagi-choice {
    width: 100%;
    min-height: 36px;
    padding: 0.42rem 0.58rem;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
    line-break: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ytec-sagi-wp-plugin *,
  .ytec-sagi-wp-plugin *::before,
  .ytec-sagi-wp-plugin *::after {
    scroll-behavior: auto;
    transition-duration: 0.001ms;
    animation-duration: 0.001ms;
  }
}

/* 2026-06-15 low-resolution PC fit pass */
.ytec-sagi-game,
.ytec-sagi-game * {
  box-sizing: border-box;
}

.ytec-sagi-game {
  container-type: inline-size;
}

.ytec-sagi-stage-list-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.ytec-sagi-stage-list-panel {
  align-content: start;
  min-height: 0;
}

.ytec-sagi-stage-list-panel .ytec-sagi-mode-image-frame {
  aspect-ratio: 1870 / 841;
}

.ytec-sagi-stage-list-panel .ytec-sagi-mode-image {
  object-fit: contain;
  object-position: center;
}

.ytec-sagi-game:fullscreen,
.ytec-sagi-game.ytec-sagi-faux-fullscreen {
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.ytec-sagi-vn-b-screen {
  width: min(1120px, 100%);
  max-width: min(1120px, calc(100vw - 18px));
  min-height: 0;
  gap: 7px;
  padding: 9px;
  overflow: visible;
}

.ytec-sagi-game:fullscreen .ytec-sagi-vn-b-screen,
.ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-vn-b-screen {
  width: min(1120px, calc(100vw - 20px));
  max-height: calc(100dvh - 20px);
  overflow: hidden;
}

.ytec-sagi-vn-b-screen .ytec-sagi-progress {
  min-height: 36px;
  padding: 6px 10px;
}

.ytec-sagi-vn-b-screen .ytec-sagi-progress-item {
  width: 27px;
  min-width: 27px;
  height: 29px;
}

.ytec-sagi-vn-b-screen .ytec-sagi-vn-topline {
  gap: 0;
  padding-right: 0;
}

.ytec-sagi-vn-b-screen .ytec-sagi-heading {
  font-size: clamp(1.05rem, 2cqi, 1.55rem);
  line-height: 1.08;
  margin: 0;
}

.ytec-sagi-vn-b-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  grid-template-areas:
    "scene status"
    "message message";
  gap: 7px;
  min-height: 0;
  border-width: 2px;
  padding: 7px;
}

.ytec-sagi-vn-scene {
  grid-area: scene;
  margin: 0;
  min-height: 0;
}

.ytec-sagi-vn-status {
  grid-area: status;
  align-self: start;
  display: grid;
  gap: 5px;
  padding: 7px;
}

.ytec-sagi-vn-status .ytec-sagi-status-row,
.ytec-sagi-status-chip {
  min-height: 27px;
  padding: 4px 8px;
  font-size: 0.8rem;
}

.ytec-sagi-vn-scene-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 5;
  max-height: min(34dvh, 245px);
  object-fit: contain;
  object-position: center;
}

.ytec-sagi-vn-caption,
.ytec-sagi-vn-scene-caption {
  font-size: 0.82rem;
  padding-block: 2px;
}

.ytec-sagi-vn-message-panel,
.ytec-sagi-vn-message-panel-ready {
  grid-area: message;
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(410px, 1.28fr);
  grid-template-areas:
    "message-title command"
    "message-text command";
  gap: 5px 9px;
  max-height: none;
  overflow: visible;
  padding: 7px;
  border-color: var(--ytec-yellow);
}

.ytec-sagi-vn-message-header {
  grid-area: message-title;
  align-items: center;
}

.ytec-sagi-vn-message-text,
.ytec-sagi-vn-message-panel-ready .ytec-sagi-vn-message-text {
  grid-area: message-text;
  max-height: none;
  overflow: visible;
  font-size: clamp(0.74rem, 0.9cqi, 0.88rem);
  line-height: 1.42;
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: auto;
}

.ytec-sagi-vn-message-text p {
  margin: 0 0 0.28em;
}

.ytec-sagi-vn-command {
  grid-area: command;
  margin: 0;
  align-self: stretch;
}

.ytec-sagi-vn-choices {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.ytec-sagi-vn-actions {
  display: none;
}

.ytec-sagi-choice {
  min-height: 32px;
  height: auto;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: auto;
  font-size: clamp(0.68rem, 0.82cqi, 0.8rem);
  line-height: 1.28;
  padding: 0.32rem 0.42rem;
}

.ytec-sagi-advice-combined-card,
.ytec-sagi-result-screen {
  width: min(1120px, calc(100vw - 18px));
  gap: 9px;
  max-height: none;
}

.ytec-sagi-game:fullscreen .ytec-sagi-advice-combined-card,
.ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-advice-combined-card,
.ytec-sagi-game:fullscreen .ytec-sagi-result-screen,
.ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-result-screen {
  max-height: calc(100dvh - 20px);
  overflow: hidden;
}

.ytec-sagi-advice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.ytec-sagi-advice-grid .ytec-sagi-advice-wide {
  grid-column: 1 / -1;
}

.ytec-sagi-result-screen .ytec-sagi-review .ytec-sagi-numbered-list {
  columns: 2;
  column-gap: 28px;
}

.ytec-sagi-result-screen .ytec-sagi-consult,
.ytec-sagi-result-screen .ytec-sagi-mascot-wrap {
  display: none;
}

.ytec-sagi-button,
.ytec-sagi-choice,
.ytec-sagi-display-preset-button,
.ytec-sagi-mute-button,
.ytec-sagi-settings-summary {
  box-sizing: border-box;
}

.ytec-sagi-display-preset-button {
  appearance: none;
  border: 2px solid #081322;
  border-radius: 3px;
  background: linear-gradient(180deg, #29445f 0%, #172c42 100%);
  color: #fff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
  min-height: 34px;
  padding: 0.32rem 0.6rem;
}

.ytec-sagi-display-preset-button[aria-pressed="true"] {
  background: linear-gradient(180deg, #fff3a6 0%, #ffd03d 100%);
  color: #081322;
}

.ytec-sagi-game.ytec-sagi-display-fullhd:fullscreen .ytec-sagi-vn-b-screen,
.ytec-sagi-game.ytec-sagi-display-fullhd.ytec-sagi-faux-fullscreen .ytec-sagi-vn-b-screen {
  width: min(1680px, calc(100vw - 28px));
}

.ytec-sagi-game.ytec-sagi-display-fullhd:fullscreen .ytec-sagi-vn-b-screen .ytec-sagi-heading,
.ytec-sagi-game.ytec-sagi-display-fullhd.ytec-sagi-faux-fullscreen .ytec-sagi-vn-b-screen .ytec-sagi-heading {
  font-size: clamp(1.35rem, 2vw, 2.05rem);
}

.ytec-sagi-game.ytec-sagi-display-fullhd:fullscreen .ytec-sagi-vn-scene-image,
.ytec-sagi-game.ytec-sagi-display-fullhd.ytec-sagi-faux-fullscreen .ytec-sagi-vn-scene-image {
  max-height: min(43dvh, 500px);
}

.ytec-sagi-game.ytec-sagi-display-fullhd:fullscreen .ytec-sagi-vn-message-text,
.ytec-sagi-game.ytec-sagi-display-fullhd.ytec-sagi-faux-fullscreen .ytec-sagi-vn-message-text {
  font-size: 1rem;
}

.ytec-sagi-game.ytec-sagi-display-fullhd:fullscreen .ytec-sagi-choice,
.ytec-sagi-game.ytec-sagi-display-fullhd.ytec-sagi-faux-fullscreen .ytec-sagi-choice {
  font-size: 0.92rem;
  min-height: 38px;
}

@container (max-width: 860px) {
  .ytec-sagi-vn-b-stage {
    grid-template-columns: 1fr;
    grid-template-areas:
      "scene"
      "status"
      "message";
  }

  .ytec-sagi-vn-message-panel,
  .ytec-sagi-vn-message-panel-ready {
    grid-template-columns: 1fr;
    grid-template-areas:
      "message-title"
      "message-text"
      "command";
  }

  .ytec-sagi-vn-choices {
    grid-template-columns: 1fr;
  }

  .ytec-sagi-advice-grid {
    grid-template-columns: 1fr;
  }

  .ytec-sagi-result-screen .ytec-sagi-review .ytec-sagi-numbered-list {
    columns: 1;
  }
}

/* 2026-06-15 1366x768 readability polish */
.ytec-sagi-stage-list-grid {
  align-items: stretch;
}

.ytec-sagi-stage-list-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.ytec-sagi-stage-list-panel .ytec-sagi-mode-subtitle {
  flex: 1 1 auto;
}

.ytec-sagi-stage-list-panel .ytec-sagi-stage-counter {
  margin-top: auto;
}

.ytec-sagi-stage-list-panel .ytec-sagi-button {
  width: 100%;
  margin-top: 0.55rem;
}

.ytec-sagi-vn-b-screen,
.ytec-sagi-game:fullscreen .ytec-sagi-vn-b-screen,
.ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-vn-b-screen {
  width: min(1088px, calc(100vw - 18px));
  max-width: 100%;
}

.ytec-sagi-game:fullscreen .ytec-sagi-vn-b-screen,
.ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-vn-b-screen {
  max-height: calc(100dvh - 16px);
}

.ytec-sagi-vn-b-screen .ytec-sagi-progress {
  height: auto;
  min-height: 34px;
  max-height: none;
  overflow: visible;
  padding: 5px 92px 5px 8px;
}

.ytec-sagi-vn-b-screen .ytec-sagi-progress-list {
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
  gap: 3px;
  overflow: visible;
}

.ytec-sagi-vn-b-screen .ytec-sagi-progress-item {
  width: 20px;
  min-width: 20px;
  height: 24px;
  font-size: 0.72rem;
  line-height: 1;
}

.ytec-sagi-vn-b-stage {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "scene"
    "status"
    "message";
  gap: 6px;
}

.ytec-sagi-vn-status {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: stretch;
  padding: 4px;
  gap: 5px;
}

.ytec-sagi-vn-status .ytec-sagi-status-row,
.ytec-sagi-status-chip {
  min-width: 0;
  min-height: 25px;
  padding: 3px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ytec-sagi-vn-scene-image {
  aspect-ratio: 16 / 5.9;
  max-height: min(36dvh, 260px);
}

.ytec-sagi-vn-message-panel,
.ytec-sagi-vn-message-panel-ready {
  grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
  gap: 6px 10px;
  padding: 7px;
}

.ytec-sagi-vn-message-title,
.ytec-sagi-vn-command-title {
  display: inline-flex;
  align-items: center;
  min-width: 168px;
  width: 168px;
  box-sizing: border-box;
  white-space: nowrap;
  flex-shrink: 0;
}

.ytec-sagi-vn-command-title {
  margin: 0 0 0.38rem;
}

.ytec-sagi-vn-message-text,
.ytec-sagi-vn-message-panel-ready .ytec-sagi-vn-message-text {
  font-size: clamp(0.82rem, 1.03cqi, 0.96rem);
  line-height: 1.48;
}

.ytec-sagi-vn-choices {
  gap: 7px;
}

.ytec-sagi-choice {
  min-height: 36px;
  font-size: clamp(0.9rem, 1.08cqi, 1rem);
  line-height: 1.34;
  padding: 0.42rem 0.58rem;
}

.ytec-sagi-advice-combined-card,
.ytec-sagi-result-screen {
  width: min(1040px, calc(100vw - 18px));
  max-width: 100%;
  overflow: visible;
}

.ytec-sagi-game:fullscreen .ytec-sagi-advice-combined-card,
.ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-advice-combined-card,
.ytec-sagi-game:fullscreen .ytec-sagi-result-screen,
.ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-result-screen {
  width: min(1040px, calc(100vw - 18px));
  max-width: 100%;
  max-height: calc(100dvh - 16px);
  overflow: auto;
}

.ytec-sagi-advice-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

.ytec-sagi-advice-combined-card .ytec-sagi-panel,
.ytec-sagi-result-screen .ytec-sagi-panel {
  min-width: 0;
}

.ytec-sagi-game.ytec-sagi-display-lowres:fullscreen .ytec-sagi-vn-b-screen,
.ytec-sagi-game.ytec-sagi-display-lowres.ytec-sagi-faux-fullscreen .ytec-sagi-vn-b-screen {
  width: min(1088px, calc(100vw - 18px));
  padding: 9px;
  gap: 7px;
}

.ytec-sagi-game.ytec-sagi-display-lowres:fullscreen .ytec-sagi-vn-scene-image,
.ytec-sagi-game.ytec-sagi-display-lowres.ytec-sagi-faux-fullscreen .ytec-sagi-vn-scene-image {
  max-height: min(36dvh, 260px);
}

.ytec-sagi-game.ytec-sagi-display-fullhd:fullscreen .ytec-sagi-vn-b-screen,
.ytec-sagi-game.ytec-sagi-display-fullhd.ytec-sagi-faux-fullscreen .ytec-sagi-vn-b-screen {
  width: min(1580px, calc(100vw - 28px));
  padding: 14px;
  gap: 10px;
}

.ytec-sagi-game.ytec-sagi-display-fullhd .ytec-sagi-vn-b-screen {
  width: min(1580px, calc(100vw - 28px));
}

.ytec-sagi-game.ytec-sagi-display-fullhd:fullscreen .ytec-sagi-vn-b-screen .ytec-sagi-heading,
.ytec-sagi-game.ytec-sagi-display-fullhd.ytec-sagi-faux-fullscreen .ytec-sagi-vn-b-screen .ytec-sagi-heading {
  font-size: clamp(1.62rem, 2.55vw, 2.7rem);
}

.ytec-sagi-game.ytec-sagi-display-fullhd .ytec-sagi-vn-b-screen .ytec-sagi-heading {
  font-size: clamp(1.3rem, 2.1cqi, 2rem);
}

.ytec-sagi-game.ytec-sagi-display-fullhd:fullscreen .ytec-sagi-vn-scene-image,
.ytec-sagi-game.ytec-sagi-display-fullhd.ytec-sagi-faux-fullscreen .ytec-sagi-vn-scene-image {
  aspect-ratio: 16 / 6.2;
  max-height: min(43dvh, 430px);
}

.ytec-sagi-game.ytec-sagi-display-fullhd:fullscreen .ytec-sagi-vn-message-text,
.ytec-sagi-game.ytec-sagi-display-fullhd.ytec-sagi-faux-fullscreen .ytec-sagi-vn-message-text {
  font-size: 1.12rem;
  line-height: 1.52;
}

.ytec-sagi-game.ytec-sagi-display-fullhd .ytec-sagi-vn-message-text {
  font-size: 1.02rem;
  line-height: 1.5;
}

.ytec-sagi-game.ytec-sagi-display-fullhd:fullscreen .ytec-sagi-choice,
.ytec-sagi-game.ytec-sagi-display-fullhd.ytec-sagi-faux-fullscreen .ytec-sagi-choice {
  min-height: 46px;
  font-size: 1.06rem;
}

.ytec-sagi-game.ytec-sagi-display-fullhd .ytec-sagi-choice {
  min-height: 40px;
  font-size: 0.98rem;
}

.ytec-sagi-game.ytec-sagi-display-fullhd:fullscreen .ytec-sagi-vn-message-title,
.ytec-sagi-game.ytec-sagi-display-fullhd:fullscreen .ytec-sagi-vn-command-title,
.ytec-sagi-game.ytec-sagi-display-fullhd.ytec-sagi-faux-fullscreen .ytec-sagi-vn-message-title,
.ytec-sagi-game.ytec-sagi-display-fullhd.ytec-sagi-faux-fullscreen .ytec-sagi-vn-command-title {
  min-width: 196px;
  width: 196px;
}

@container (min-width: 681px) {
  .ytec-sagi-vn-message-panel,
  .ytec-sagi-vn-message-panel-ready {
    grid-template-columns: minmax(230px, 0.82fr) minmax(320px, 1.18fr);
    grid-template-areas:
      "message-title command"
      "message-text command";
  }

  .ytec-sagi-vn-command {
    min-width: 0;
  }

  .ytec-sagi-vn-command-title {
    width: 168px;
    min-width: 168px;
    max-width: 100%;
    white-space: nowrap;
  }

  .ytec-sagi-vn-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 2026-06-18 smartphone playability pass */
@container (max-width: 680px) {
  .ytec-sagi-page {
    padding: 6px;
  }

  .ytec-sagi-game {
    width: 100%;
    max-width: 100%;
  }

  .ytec-sagi-game:fullscreen,
  .ytec-sagi-game.ytec-sagi-faux-fullscreen {
    align-items: stretch;
    justify-content: start;
    padding: 6px;
    overflow: auto;
  }

  .ytec-sagi-card,
  .ytec-sagi-vn-b-screen,
  .ytec-sagi-advice-combined-card,
  .ytec-sagi-result-screen {
    width: 100%;
    max-width: 100%;
    padding: 8px;
    border-width: 2px;
    outline-width: 2px;
    outline-offset: -5px;
    box-shadow: none;
  }

  .ytec-sagi-title-card,
  .ytec-sagi-mode-card,
  .ytec-sagi-stage-list-card,
  .ytec-sagi-readable-card {
    gap: 8px;
  }

  .ytec-sagi-card > *,
  .ytec-sagi-vn-b-screen > *,
  .ytec-sagi-vn-b-stage > *,
  .ytec-sagi-vn-message-panel > * {
    min-width: 0;
  }

  .ytec-sagi-game:fullscreen .ytec-sagi-card,
  .ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-card,
  .ytec-sagi-game:fullscreen .ytec-sagi-vn-b-screen,
  .ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-vn-b-screen,
  .ytec-sagi-game:fullscreen .ytec-sagi-advice-combined-card,
  .ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-advice-combined-card,
  .ytec-sagi-game:fullscreen .ytec-sagi-result-screen,
  .ytec-sagi-game.ytec-sagi-faux-fullscreen .ytec-sagi-result-screen {
    width: 100%;
    max-width: 100%;
    max-height: none;
    overflow: visible;
  }

  .ytec-sagi-settings {
    position: absolute;
    top: 8px;
    right: 8px;
    justify-self: auto;
    z-index: 20;
  }

  .ytec-sagi-settings-summary {
    min-height: 36px;
    padding: 0.3rem 0.55rem;
    font-size: 0.86rem;
  }

  .ytec-sagi-audio-panel {
    right: 0;
    left: auto;
    width: min(340px, calc(100vw - 20px));
    max-height: 70dvh;
    padding: 8px;
    gap: 8px;
    overflow: auto;
  }

  .ytec-sagi-audio-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 7px;
  }

  .ytec-sagi-audio-row .ytec-sagi-mute-button {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .ytec-sagi-display-row {
    justify-content: stretch;
  }

  .ytec-sagi-display-button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    white-space: normal;
  }

  .ytec-sagi-heading,
  .ytec-sagi-stage-select-card .ytec-sagi-heading,
  .ytec-sagi-title-card .ytec-sagi-heading {
    width: 100%;
    font-size: clamp(1.26rem, 7.2vw, 1.9rem);
    line-height: 1.12;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-break: auto;
  }

  .ytec-sagi-console-label {
    min-height: 22px;
    font-size: 0.78rem;
  }

  .ytec-sagi-title-layout-single .ytec-sagi-title-image-frame,
  .ytec-sagi-mode-card .ytec-sagi-mode-image-frame,
  .ytec-sagi-stage-list-panel .ytec-sagi-mode-image-frame {
    aspect-ratio: 1870 / 841;
    max-height: none;
  }

  .ytec-sagi-title-intro .ytec-sagi-lead,
  .ytec-sagi-stage-select-card .ytec-sagi-lead,
  .ytec-sagi-mode-description,
  .ytec-sagi-stage-description {
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .ytec-sagi-mode-grid,
  .ytec-sagi-stage-list-grid,
  .ytec-sagi-advice-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ytec-sagi-mode-panel,
  .ytec-sagi-stage-list-panel {
    padding: 8px;
    gap: 7px;
  }

  .ytec-sagi-mode-title,
  .ytec-sagi-stage-card-title {
    font-size: clamp(1rem, 5.2vw, 1.34rem);
    line-height: 1.28;
    overflow-wrap: anywhere;
  }

  .ytec-sagi-button {
    width: 100%;
    min-height: 44px;
    padding: 0.55rem 0.72rem;
    font-size: 0.96rem;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ytec-sagi-list {
    min-width: 0;
    padding-left: 1.1rem;
  }

  .ytec-sagi-list li {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .ytec-sagi-vn-b-screen {
    gap: 6px;
    overflow: visible;
  }

  .ytec-sagi-vn-b-screen .ytec-sagi-progress {
    min-height: 34px;
    padding: 5px 76px 5px 6px;
    gap: 5px;
  }

  .ytec-sagi-vn-b-screen .ytec-sagi-progress-list {
    flex-wrap: nowrap;
    gap: 3px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .ytec-sagi-vn-b-screen .ytec-sagi-progress-list::-webkit-scrollbar {
    display: none;
  }

  .ytec-sagi-vn-b-screen .ytec-sagi-progress-item {
    width: 22px;
    min-width: 22px;
    height: 24px;
    font-size: 0.72rem;
  }

  .ytec-sagi-vn-b-screen .ytec-sagi-progress-text {
    font-size: 0.78rem;
  }

  .ytec-sagi-vn-b-screen .ytec-sagi-vn-topline {
    padding-right: 0;
  }

  .ytec-sagi-vn-b-screen .ytec-sagi-kicker {
    font-size: 0.72rem;
  }

  .ytec-sagi-vn-b-screen .ytec-sagi-heading {
    font-size: clamp(1.12rem, 6.2vw, 1.6rem);
    line-height: 1.12;
    margin: 0;
  }

  .ytec-sagi-vn-b-stage {
    grid-template-columns: 1fr;
    grid-template-areas:
      "scene"
      "status"
      "message";
    gap: 6px;
    padding: 6px;
    border-width: 2px;
  }

  .ytec-sagi-vn-scene-image {
    aspect-ratio: 1870 / 841;
    max-height: none;
  }

  .ytec-sagi-vn-caption,
  .ytec-sagi-vn-scene-caption {
    font-size: 0.78rem;
    padding-block: 1px;
  }

  .ytec-sagi-vn-status {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 4px;
  }

  .ytec-sagi-vn-status .ytec-sagi-status-row,
  .ytec-sagi-status-chip {
    min-height: 28px;
    padding: 4px 7px;
    font-size: 0.78rem;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .ytec-sagi-vn-message-panel,
  .ytec-sagi-vn-message-panel-ready {
    grid-template-columns: 1fr;
    grid-template-areas:
      "message-title"
      "message-text"
      "command";
    gap: 6px;
    padding: 6px;
    max-height: none;
    overflow: visible;
  }

  .ytec-sagi-vn-message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .ytec-sagi-vn-message-title,
  .ytec-sagi-vn-command-title {
    width: 150px;
    min-width: 150px;
    max-width: 100%;
    min-height: 26px;
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .ytec-sagi-vn-message-count {
    flex: 0 0 auto;
    font-size: 0.78rem;
  }

  .ytec-sagi-vn-message-text,
  .ytec-sagi-vn-message-panel-ready .ytec-sagi-vn-message-text {
    max-height: none;
    overflow: visible;
    font-size: 0.92rem;
    line-height: 1.55;
    word-break: normal;
    overflow-wrap: anywhere;
    line-break: auto;
  }

  .ytec-sagi-vn-command {
    min-width: 0;
    max-height: none;
  }

  .ytec-sagi-vn-choices,
  .ytec-sagi-vn-message-panel-ready .ytec-sagi-vn-choices,
  .ytec-sagi-vn-actions {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .ytec-sagi-vn-actions {
    display: grid;
  }

  .ytec-sagi-choice {
    width: 100%;
    min-height: 46px;
    padding: 0.55rem 0.65rem;
    font-size: 0.9rem;
    line-height: 1.34;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    line-break: auto;
  }
}
