/*
 * RealAmadeus V2 - app stylesheet (2nd stylesheet; loaded after style/tailwind.css).
 *
 * VERBATIM port of V1 app/amadeus/app/globals.css (working tree of 2026-11-16, 2966 lines, LF).
 * Every rule, selector and declaration is identical and in the original order, except:
 *   1. The 10 @font-face URLs "/resources/fonts/..." are stylesheet-relative "resources/fonts/...".
 *      CSS url() resolves against this stylesheet's URL; Trunk emits it at the dist root
 *      ({public_url}amadeus-<hash>.css), so the fonts load from {public_url}resources/fonts/...
 *      (web: /amadeus/resources/fonts/..., desktop: /resources/fonts/...).
 *   2. Each of the 6 "backdrop-filter" declarations is preceded by its WebKit-prefixed copy (same
 *      value), exactly as V1's Lightning CSS build shipped them (Safari < 18, macOS WKWebView).
 *      Comments never spell out the prefixed name, so grepping for it counts exactly 6 (spec 17.5).
 *   3. V1's first line, the Google Fonts @import of Noto Serif JP 300/400/700 (display=swap), is not
 *      here: index.html inserts that stylesheet with a script right before this file's <link>, so
 *      Google's faces still precede the local @font-face rules below. While fonts.googleapis.com
 *      was slow or unreachable, the @import kept this sheet pending, which held back Trunk's module
 *      loader (Chromium: the app never started) or this whole sheet (WebKit: unstyled page).
 *
 * Cascade contract (see spec-css.md section 3): keep this file UNLAYERED, unscoped and in this
 * order, never run it through Tailwind, and keep it after the Tailwind bundle and the Google Fonts
 * sheet in index.html.
 * Its <link> carries data-no-minify: a target-less Lightning CSS pass (Trunk --minify) would strip
 * the prefixed declarations of edit 2.
 * It must be disabled on non-/app routes (<link id="amadeus-app-css">), because its unlayered
 * "* { margin: 0; padding: 0 }" reset overrides every Tailwind spacing utility of the site pages.
 */

@font-face {
  font-family: "MateSC";
  src: url("resources/fonts/MateSC-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Eurostile";
  src: url("resources/fonts/Eurostile Condensed Bold.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "DepartureMono";
  src: url("resources/fonts/DepartureMono-Regular.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "Liberation Sans";
  src: url("resources/fonts/LiberationSans.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "MS Mincho";
  src: local("MS Mincho"), local("ＭＳ 明朝"), local("MS-Mincho"), url("resources/fonts/MSMINCHO.TTF") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Yu Mincho";
  src: local("Yu Mincho"), local("游明朝"), url("resources/fonts/NotoSerifCJKtc-Regular.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif CJK JP";
  src: local("Noto Serif CJK JP"), local("Noto Serif JP");
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif JP";
  src: url("resources/fonts/NotoSerif-Light.ttf") format("truetype");
  font-weight: 300;
  font-display: swap;
  unicode-range: U+0000-024F, U+0370-052F, U+1E00-1FFF;
}

@font-face {
  font-family: "Noto Serif JP";
  src: url("resources/fonts/NotoSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-024F, U+0370-052F, U+1E00-1FFF;
}

@font-face {
  font-family: "Noto Serif";
  src: url("resources/fonts/NotoSerif-Regular.ttf") format("truetype");
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif CJK KR";
  src: url("resources/fonts/NotoSerifCJKkr-Regular.otf") format("opentype");
  font-display: swap;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

input, textarea {
  user-select: text;
  -webkit-user-select: text;
}

*:focus {
  outline: none;
}

*:focus-visible {
  outline: none !important;
}

select:focus,
select:focus-visible,
.config-input-control:focus,
.config-input-control:focus-visible {
  outline: none !important;
  border-color: #333 !important;
  box-shadow: none !important;
}

.amadeus-root {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  overflow: hidden;
}

.amadeus-root {
  font-family: "Noto Serif JP", "MS Mincho", serif;
  font-weight: 300;
  background: #000;
  color: #fff;
}

button,
input,
select {
  font: inherit;
}

.real-amadeus-root {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  position: relative;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding-top: env(safe-area-inset-top, 0);
  padding-right: env(safe-area-inset-right, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-left: env(safe-area-inset-left, 0);
}

.window-frame {
  position: relative;
  overflow: hidden;
  background: #000;
  max-width: 100%;
  max-height: 100%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.window-frame.windowed {
  border: 1px solid #666;
}

.viewport {
  width: 1920px;
  height: 1080px;
  transform-origin: top left;
  position: relative;
  image-rendering: high-quality;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.system-panel {
  position: absolute;
  inset: 0;
  transform-origin: center;
  transition: transform 500ms linear;
  overflow: visible;
}

.menu-wallpaper {
  position: absolute;
  width: 1920px;
  height: 1080px;
  transform: scale(1.666667);
  left: -250px;
  top: 20px;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.title-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 35px;
  background: #c8c8c8;
  color: #464646;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Liberation Sans", sans-serif;
  font-size: 22px;
  font-weight: 400;
  z-index: 10;
}

.system-bg {
  position: absolute;
  inset: 35px 0 0 0;
  width: 1920px;
  height: 1045px;
  object-fit: cover;
}

.login-panel {
  position: absolute;
  inset: 0;
}

.login-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 700px;
  height: 700px;
  transform: translate(-50%, calc(-50% - 182px));
  object-fit: contain;
}

.login-row {
  position: absolute;
  left: 50%;
  height: 50px;
  width: 0;
}

.login-row label {
  position: absolute;
  left: -539px;
  top: 50%;
  width: 220px;
  text-align: right;
  color: #ffe600;
  font-size: 29px;
  font-family: "MateSC", serif;
  font-weight: 700;
  transform: translateY(-50%);
  line-height: 1;
}

.user-id-row label {
  color: #ffe600;
}

.login-row input {
  position: absolute;
  left: -300px;
  top: 0;
  width: 600px;
  height: 50px;
  border: 1px solid rgba(144, 144, 144, 0.5);
  background: #000;
  color: #ffd700;
  font-size: 36px;
  font-family: "MS Mincho", "Noto Serif JP", serif;
  font-weight: 400;
  padding: 0 10px;
}

.user-id-row {
  top: calc(50% + 106.5px);
}

.password-row {
  top: calc(50% + 176.5px);
}

.password-row label {
  color: #ffd700;
}

.password-mask-display {
  position: absolute;
  left: -300px;
  top: 0;
  width: 600px;
  height: 50px;
  border: 1px solid rgba(144, 144, 144, 0.5);
  background: #000;
  color: #ffd700;
  font-size: 36px;
  font-family: "MS Mincho", "Noto Serif JP", serif;
  font-weight: 400;
  padding: 0 10px;
  display: flex;
  align-items: center;
  white-space: pre;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.login-row input.password-masked-input {
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: #ffd700;
  z-index: 2;
}

.login-button {
  position: absolute;
  left: calc(50% + 301.5px);
  top: calc(50% + 169px);
  width: 65px;
  height: 65px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.login-button img {
  width: 100%;
  height: 100%;
}

.login-skip-row {
  position: absolute;
  left: 50%;
  top: calc(50% + 176.5px);
  height: 50px;
  width: 0;
}

.login-skip-message {
  position: absolute;
  left: -300px;
  top: 0;
  width: 600px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffd700;
  font-size: 28px;
  font-family: "Noto Serif JP", "Noto Serif CJK JP", "MS Mincho", serif;
  font-weight: 300;
  white-space: nowrap;
}

.login-error {
  position: absolute;
  left: 50%;
  top: calc(50% + 271.5px);
  transform: translate(calc(-50% - 220px), -50%);
  color: #ff0000;
  font-size: 20px;
  font-family: "MateSC", serif;
  font-weight: 700;
  white-space: nowrap;
}

.loading-panel {
  position: absolute;
  inset: 0;
  padding: 70px 0 0 60px;
  overflow: hidden;
}

.boot-text {
  color: #ff0000;
  font-family: "DepartureMono", monospace;
  font-size: 18px;
  line-height: 1.2;
  white-space: pre-wrap;
}

.boot-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 900px;
  height: 900px;
  transform: translate(-50%, -50%);
  object-fit: contain;
}

.chat-panel-root {
  position: absolute;
  inset: 35px 0 0 0;
  animation: chat-fade-in 500ms linear;
  touch-action: manipulation;
}

@keyframes chat-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.live2d-host {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.live2d-host canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.dialogue-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 300px;
  background: rgba(45, 15, 0, 0.94);
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
}

.dialogue-panel .dialogue-advance-hitbox,
.dialogue-panel .cancel-streaming-button {
  pointer-events: auto;
}

.cancel-streaming-button {
  position: absolute;
  left: 20px;
  bottom: 12px;
  font-size: 14px;
  color: #ffcc00;
  background: rgba(30, 10, 0, 0.7);
  border: 1px solid rgba(255, 153, 0, 0.6);
  border-radius: 8px;
  padding: 4px 16px;
  z-index: 2;
  cursor: pointer;
  font-family: "Noto Serif JP", "MS Mincho", serif;
  transition: all 0.2s ease;
}
.cancel-streaming-button:hover {
  background: rgba(255, 153, 0, 0.2);
  color: #ffffff;
}

.pc-cancel-hint {
  position: absolute;
  left: 20px;
  bottom: 20px;
  font-size: 24px;
  font-weight: 300;
  color: #ffffff;
  z-index: 2;
  pointer-events: none;
  font-family: "Noto Serif JP", "MS Mincho", serif;
}

.sleeping-input {
  font-style: italic !important;
  opacity: 0.6;
}

.dialogue-advance-hitbox {
  position: absolute;
  inset: 0;
  border: none;
  background: transparent;
  z-index: 1;
  cursor: pointer;
}

.name-text {
  position: absolute;
  width: 300px;
  height: 50px;
  left: 50%;
  top: calc(50% + 112px - 25px);
  transform: translateX(-50%);
  font-size: 36px;
  text-align: center;
  pointer-events: none;
  z-index: 2;
}

.dialogue-text {
  position: absolute;
  width: 1280px;
  height: 200px;
  left: 50%;
  top: calc(50% - 12px - 100px);
  transform: translateX(-50%);
  font-size: 36px;
  line-height: 1;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
  pointer-events: none;
  z-index: 2;
}

.waiting-indicator {
  position: absolute;
  right: 80px;
  bottom: 35px;
  text-align: right;
  color: rgba(255, 153, 0, 0.8);
  font-size: 28px;
  font-family: "Noto Serif JP", serif;
  font-weight: 300;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

.input-panel {
  position: absolute;
  left: 50px;
  right: 50px;
  bottom: 25px;
  height: 60px;
  background: #4e1e15;
  border: 1px solid rgba(255, 102, 0, 0.3);
  padding: 5px 65px 5px 16px;
  z-index: 6;
}

.chat-input {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 28px;
  outline: none;
}

.chat-input::placeholder {
  color: rgba(128, 128, 128, 0.6);
  font-style: italic;
}

.chat-send-button {
  display: none;
}

.chat-input-actions {
  position: absolute;
  right: 10px;
  top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-mic-button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 153, 0, 0.65);
  background: #572014;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.chat-mic-button.recording {
  background: #962f1c;
  border-color: #ff8866;
}

.chat-mic-level {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -6px;
  height: 3px;
  background: rgba(255, 153, 0, 0.18);
}

.chat-mic-level span {
  display: block;
  height: 100%;
  background: #ff9900;
}

.chat-stt-hint {
  position: absolute;
  left: 12px;
  bottom: calc(100% + 4px);
  color: #ffcc88;
  font-size: 16px;
}

.auto-text {
  position: absolute;
  width: 200px;
  height: 50px;
  left: calc(50% + 800px - 100px);
  top: calc(50% - 427.5px - 25px);
  color: #ff9900;
  font-size: 70px;
  text-align: center;
  line-height: 50px;
  z-index: 7;
}

.menu-panel {
  position: absolute;
  inset: 0;
  z-index: 99;
}

.menu-bg {
  position: absolute;
  left: -50px;
  top: 0;
  width: 640px;
  height: 1080px;
  object-fit: fill;
  display: block;
  z-index: 1;
  animation: menu-bg-fade 250ms linear;
}

.menu-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  animation: menu-content-fade 300ms linear;
}

.menu-panel.closing .menu-bg {
  animation: none;
  opacity: 0;
  transition: opacity 200ms linear;
}

.menu-panel.closing .menu-content {
  animation: none;
  opacity: 0;
  transition: opacity 200ms linear;
}

@keyframes menu-bg-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes menu-content-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.menu-icon {
  position: absolute;
  width: 90px;
  height: 90px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.menu-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.menu-icon .menu-icon-selected {
  opacity: 0;
}

.menu-icon.selected .menu-icon-selected {
  opacity: 1;
}

.menu-icon.selected {
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6)) brightness(1.2);
  color: #fff;
}

.menu-label.selected,
.small-menu-label.selected {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6)) brightness(1.2);
  color: #fff;
}

.menu-label {
  position: absolute;
  width: 200px;
  height: 50px;
  border: none;
  background: transparent;
  color: #ffc900;
  white-space: pre-line;
  text-align: left;
  padding-left: 40px;
  font-size: 34px;
  line-height: 31px;
  font-family: "Eurostile", sans-serif;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.small-menu-label {
  position: absolute;
  width: 200px;
  height: 50px;
  border: none;
  background: transparent;
  color: #ffc900;
  white-space: pre-line;
  text-align: center;
  font-size: 26px;
  line-height: 32px;
  font-family: "Eurostile", sans-serif;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.mobile-menu-toggle {
  display: none;
}



@media (pointer: coarse), (max-width: 900px) {
  .mobile-menu-toggle {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    left: calc(env(safe-area-inset-left, 0px) + 10px);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    height: 44px;
    border: 1px solid rgba(255, 153, 0, 0.6);
    background: rgba(20, 10, 0, 0.82);
    color: #ffb347;
    font-family: "Eurostile", sans-serif;
    font-size: 18px;
    letter-spacing: 0.04em;
    z-index: 400;
  }

  .input-panel {
    padding: 5px 170px 5px 10px;
  }

  .chat-send-button {
    display: block;
    width: 96px;
    height: 44px;
    border: 1px solid rgba(255, 153, 0, 0.7);
    background: #6a2817;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
  }

  .chat-send-button:disabled {
    opacity: 0.5;
    cursor: default;
  }

  .chat-mic-button {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
}



.overlay-panel {
  position: absolute;
  inset: 0;
  z-index: 110;
  animation: overlay-fade 250ms linear;
}

.overlay-panel.closing {
  animation: none;
  opacity: 0;
  transition: opacity 200ms linear;
  pointer-events: none;
}

@keyframes overlay-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.overlay-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: stretch;
}

.overlay-header {
  position: absolute;
  top: 35px;
  left: 50px;
  right: 50px;
  z-index: 2;
  height: 80px;
}

.overlay-header h2 {
  color: #ff9900;
  font-size: 64px;
  font-family: "MS Mincho", "Noto Serif JP", serif;
  font-weight: 400;
  line-height: 1;
  display: flex;
  align-items: center;
}

.status-panel .overlay-header {
  top: 30px;
}

.help-panel .overlay-header {
  top: 60px;
  left: 100px;
  right: 100px;
}

.changelog-panel .overlay-header {
  top: 80px;
  left: 100px;
  right: 100px;
  height: 60px;
}

.changelog-panel .overlay-header h2 {
  height: 60px;
  align-items: flex-end;
  padding-bottom: 12px;
}

.line {
  width: 100%;
  height: 2px;
  background: #ff9900;
  margin-top: 8px;
}

.line.thin {
  height: 1px;
}

.overlay-close-button {
  position: absolute;
  right: 100px;
  bottom: 60px;
  width: 210px;
  height: 70px;
  border: none;
  background: #464646;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  z-index: 3;
}

.backlog-content {
  position: absolute;
  top: 170px;
  left: 90px;
  right: 90px;
  bottom: 180px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 30px;
  scrollbar-gutter: stable;
  box-sizing: border-box;
  min-width: 0;
}

.backlog-row {
  position: relative;
  min-height: 40px;
  padding: 5px 20px;
  font-size: 26px;
  line-height: 1.3;
  box-sizing: border-box;
  flex-shrink: 0;
}

.backlog-name {
  position: absolute;
  left: 20px;
  top: 10px;
  width: 115px;
  font-weight: 700;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.backlog-message {
  margin-left: 265px;
  padding-top: 5px;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
  min-width: 0;
  box-sizing: border-box;
}

.backlog-content::-webkit-scrollbar,
.change-log-content::-webkit-scrollbar,
.help-content::-webkit-scrollbar,
.config-form::-webkit-scrollbar,
.dialogue-text::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.backlog-content::-webkit-scrollbar-track,
.change-log-content::-webkit-scrollbar-track,
.help-content::-webkit-scrollbar-track,
.config-form::-webkit-scrollbar-track,
.dialogue-text::-webkit-scrollbar-track {
  background: #fff;
}

.backlog-content::-webkit-scrollbar-thumb,
.change-log-content::-webkit-scrollbar-thumb,
.help-content::-webkit-scrollbar-thumb,
.config-form::-webkit-scrollbar-thumb,
.dialogue-text::-webkit-scrollbar-thumb {
  background: #ff9900;
}

.status-clock {
  position: absolute;
  top: 20px;
  left: 650px;
  width: 1820px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 54px;
  font-family: "MS Mincho", "Noto Serif JP", serif;
  z-index: 2;
}

.status-grid {
  position: absolute;
  top: 160px;
  left: 52px;
  width: 837px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 65px;
}

.status-row {
  display: flex;
  flex-direction: row;
  min-height: 50px;
  width: 100%;
}

.status-label {
  color: #ff9900;
  font-size: 32px;
  font-family: "MS Mincho", "Noto Serif JP", serif;
  width: 250px;
  min-width: 250px;
  line-height: 50px;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.status-value {
  color: #fff;
  font-size: 32px;
  font-family: "MS Mincho", "Noto Serif JP", serif;
  margin-left: 20px;
  line-height: 50px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}

.status-value .good {
  color: #44ff44;
}

.status-value .warn {
  color: #ffff44;
}

.status-value .bad {
  color: #ff4444;
}

.status-credits {
  position: absolute;
  left: 50px;
  bottom: 10px;
  width: 1820px;
  color: #808080;
  font-size: 24px;
  font-family: "MS Mincho", "Noto Serif JP", serif;
  z-index: 2;
  line-height: 1.0;
  white-space: pre-line;
}

.status-achievement-row {
  position: absolute;
  top: 160px;
  right: 50px;
  width: 700px;
  height: 50px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
  text-align: left;
}

.status-achievement-label {
  width: 250px;
  min-width: 250px;
  color: #ff9900;
  font-size: 32px;
  font-family: "MS Mincho", "Noto Serif JP", serif;
  line-height: 50px;
  transition: color 150ms linear;
}

.status-achievement-value {
  color: #fff;
  font-size: 32px;
  font-family: "MS Mincho", "Noto Serif JP", serif;
  line-height: 50px;
  white-space: nowrap;
  transition: color 150ms linear;
}

.status-achievement-underline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #ff9900;
  opacity: 0;
  transition: opacity 150ms linear;
}

.status-achievement-row:hover .status-achievement-label {
  color: #ffb84d;
}

.status-achievement-row:hover .status-achievement-value {
  color: #ffd9a0;
}

.status-achievement-row:hover .status-achievement-underline {
  opacity: 0.6;
}

.achievement-panel-title {
  position: absolute;
  top: 40px;
  left: 40px;
  color: #ff9900;
  font-size: 64px;
  font-family: "MS Mincho", "Noto Serif JP", serif;
  line-height: 1;
  z-index: 2;
}

.achievement-panel-progress {
  position: absolute;
  top: 55px;
  right: 60px;
  color: #fff;
  font-size: 36px;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
  z-index: 2;
}

.achievement-list {
  position: absolute;
  top: 140px;
  left: 40px;
  right: 40px;
  bottom: 150px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
}

.achievement-list::-webkit-scrollbar {
  display: none; /* Safari and Chrome */
}

.achievement-row {
  position: relative;
  flex-shrink: 0;
  height: 90px;
  display: flex;
  flex-direction: row;
  align-items: center;
  border: 1px solid;
  box-sizing: border-box;
}

.achievement-row.unlocked {
  background: #2a2a00;
  border-color: #ff9900;
}

.achievement-row.locked {
  background: #1a1a1a;
  border-color: #333333;
}

.achievement-icon {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 25px;
  margin-left: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.achievement-icon.unlocked {
  background: #ff9900;
}

.achievement-icon.locked {
  background: #444444;
}

.achievement-text {
  flex: 1;
  min-width: 0;
  margin: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.achievement-row-title {
  font-size: 28px;
  font-weight: 700;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.achievement-row.unlocked .achievement-row-title {
  color: #ff9900;
}

.achievement-row.locked .achievement-row-title {
  color: #888888;
}

.achievement-row-desc {
  font-size: 22px;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.achievement-row.unlocked .achievement-row-desc {
  color: #fff;
}

.achievement-row.locked .achievement-row-desc {
  color: #666666;
}

.achievement-date {
  width: 220px;
  min-width: 220px;
  margin-right: 20px;
  text-align: right;
  color: #aaaaaa;
  font-size: 18px;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
}

.achievement-toast {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 90px;
  box-sizing: border-box;
  background: #2a2a00;
  border: 2px solid #ff9900;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 400ms linear;
  pointer-events: none;
  z-index: 40;
}

.achievement-toast.visible {
  opacity: 1;
}

.achievement-toast-title {
  color: #ff9900;
  font-size: 26px;
  font-weight: 700;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
  white-space: nowrap;
}

.achievement-toast-desc {
  color: #fff;
  font-size: 20px;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
  white-space: nowrap;
}

.live2d-shift {
  position: absolute;
  inset: 0;
  transition: transform 450ms cubic-bezier(0.645, 0.045, 0.355, 1);
}

.live2d-shift.live2d-shifted {
  transform: translateX(28%);
}

.mini-game-button {
  position: absolute;
  right: 60px;
  bottom: 100px;
  width: 140px;
  height: 50px;
  padding: 0;
  background: #333333;
  border: 1px solid #ff9900;
  color: #ff9900;
  font-size: 22px;
  font-family: "MS Mincho", "Noto Serif JP", serif;
  opacity: 0.85;
  cursor: pointer;
  z-index: 10;
  transition: opacity 150ms linear, background 150ms linear;
}

.mini-game-button:hover {
  opacity: 1;
  background: #3d3d3d;
}

.mobile-achievements-trigger-button {
  display: none;
}

.mini-game-title {
  position: absolute;
  top: 40px;
  left: 40px;
  color: #ff9900;
  font-size: 64px;
  font-family: "MS Mincho", "Noto Serif JP", serif;
  line-height: 1;
  pointer-events: none;
  z-index: 3;
}

.mini-game-content {
  position: absolute;
  top: 140px;
  left: 60px;
  bottom: 80px;
  width: 50%;
  z-index: 3;
}

.mini-game-menu,
.mini-game-playing,
.mini-game-result {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.mini-game-menu {
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.mg-menu-title {
  color: #fff;
  font-size: 44px;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
  text-align: center;
}

.mg-menu-desc {
  color: #aaaaaa;
  font-size: 26px;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
  text-align: center;
  max-width: 100%;
  overflow-wrap: break-word;
}

.mg-start-button {
  width: 300px;
  height: 70px;
  padding: 0;
  border: none;
  background: #ff9900;
  color: #fff;
  font-size: 32px;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
  cursor: pointer;
  transition: background 150ms linear;
}

.mg-start-button:hover {
  background: #ffad33;
}

.mini-game-playing {
  gap: 20px;
}

.mg-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.mg-question-counter {
  color: #ff9900;
  font-size: 28px;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
}

.mg-score-label {
  color: #fff;
  font-size: 28px;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
}

.mg-question-box {
  width: 100%;
  height: 110px;
  min-height: 110px;
  box-sizing: border-box;
  padding: 20px;
  background: #1a1a1a;
  border: 1px solid #333333;
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 30px;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
  overflow-wrap: break-word;
  overflow: hidden;
}

.mg-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.mg-answer {
  height: 65px;
  min-width: 0;
  box-sizing: border-box;
  padding: 15px;
  background: #2a2a2a;
  border: 1px solid #444444;
  display: flex;
  align-items: center;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 150ms linear, background 150ms linear;
}

.mg-answer:not(.revealed):hover {
  border-color: #ff9900;
}

.mg-answer.revealed {
  cursor: default;
}

.mg-answer.revealed.correct {
  background: #004400;
}

.mg-answer.revealed.wrong {
  background: #440000;
}

.mg-answer-text {
  width: 100%;
  color: #fff;
  font-size: 24px;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mg-spacer {
  flex: 1;
}

.mg-next-button {
  align-self: flex-end;
  width: auto;
  min-width: 200px;
  max-width: 100%;
  min-height: 55px;
  height: auto;
  box-sizing: border-box;
  padding: 8px 24px;
  border: none;
  background: #ff9900;
  color: #fff;
  font-size: 26px;
  line-height: 1.25;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 150ms linear;
}

.mg-next-button:hover {
  background: #ffad33;
}

.mini-game-result {
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.mg-result-title {
  color: #ff9900;
  font-size: 48px;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
}

.mg-score-result {
  color: #fff;
  font-size: 40px;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
}

.mg-result-comment {
  color: #ff9900;
  font-size: 26px;
  font-style: italic;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
  text-align: center;
  max-width: 100%;
  overflow-wrap: break-word;
}

.mg-result-buttons {
  display: flex;
  flex-direction: row;
  gap: 30px;
}

.mg-retry-button,
.mg-menu-back-button {
  width: auto;
  min-width: 220px;
  min-height: 60px;
  height: auto;
  box-sizing: border-box;
  padding: 8px 24px;
  border: none;
  color: #fff;
  font-size: 28px;
  line-height: 1.25;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: filter 150ms linear;
}

.mg-retry-button {
  background: #ff9900;
}

.mg-menu-back-button {
  background: #4d4d4d;
}

.mg-retry-button:hover,
.mg-menu-back-button:hover {
  filter: brightness(1.15);
}

.mg-comment-bubble {
  position: absolute;
  right: 120px;
  bottom: 180px;
  width: 600px;
  box-sizing: border-box;
  padding: 20px;
  background: rgba(45, 15, 0, 0.9);
  border: 1px solid #ff9900;
  border-radius: 12px;
  color: #fff;
  font-size: 26px;
  font-family: "Noto Serif CJK JP", "Noto Serif JP", serif;
  overflow-wrap: break-word;
  z-index: 3;
}

.mg-close-button {
  z-index: 4;
}

.change-log-content {
  position: absolute;
  top: 180px;
  left: 140px;
  right: 100px;
  bottom: 160px;
  padding-right: 30px;
  z-index: 2;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.change-log-entry .change-log-head {
  position: relative;
  height: 50px;
}

.change-log-entry .version {
  position: absolute;
  left: 0;
  bottom: 0;
  color: #ff9900;
  font-family: "MS Mincho", "Noto Serif JP", serif;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 1.75px;
}

.change-log-entry .date {
  position: absolute;
  left: 450px;
  bottom: 0;
  color: #808080;
  font-family: "MS Mincho", "Noto Serif JP", serif;
  font-size: 28px;
}

.change-log-entry ul {
  margin-top: 10px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  color: #fff;
  font-size: 28px;
  line-height: 42px;
}

.help-content {
  position: absolute;
  top: 210px;
  left: 140px;
  right: 140px;
  bottom: 70px;
  z-index: 2;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.help-entry .title {
  color: #ff9900;
  font-size: 36px;
  height: 50px;
  line-height: 50px;
}

.help-entry .line.thin {
  margin-top: 0;
}

.help-entry .description {
  margin-top: 10px;
  color: #e6e6e6;
  font-size: 28px;
}

.dialog-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.7);
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlay-fade 250ms linear;
}

.dialog-overlay.closing {
  animation: none;
  opacity: 0;
  transition: opacity 200ms linear;
  pointer-events: none;
}

.confirmation-dialog {
  position: relative;
  width: 800px;
  height: 300px;
  border: 1px solid #ffc900;
  background: #1a1a1a;
  padding: 0;
}

.confirmation-dialog .message {
  position: absolute;
  left: 40px;
  right: 40px;
  top: 70px;
  height: 80px;
  color: #fff;
  font-size: 36px;
  text-align: center;
  line-height: 1.2;
}

.confirmation-dialog .choice {
  position: absolute;
  top: 220px;
  width: 200px;
  height: 60px;
  border: none;
  background: #404040;
  color: #fff;
  font-family: "Noto Serif JP", "Noto Serif CJK JP", "MS Mincho", serif;
  font-size: 30px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 2px;
}

.confirmation-dialog .choice.no {
  left: 100px;
}

.confirmation-dialog .choice.yes {
  right: 100px;
}

.confirmation-dialog .choice.selected {
  background: #ffc900;
  color: #000;
}

.config-panel {
  z-index: 120;
}

.config-main {
  position: absolute;
  inset: 0;
  z-index: 2;
  font-family: "Noto Serif JP", "Noto Serif CJK JP", "MS Mincho", serif;
}

.config-title {
  position: absolute;
  left: 22px;
  top: 55px;
  width: 400px;
  text-align: center;
  color: #ff9900;
  font-size: 90px;
  line-height: 1;
  font-family: "MS Mincho", "Noto Serif JP", serif;
}

.config-sidebar {
  position: absolute;
  top: 200px;
  left: 20px;
  width: 400px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.config-sidebar button {
  width: 400px;
  height: 100px;
  border: none;
  background: #333;
  color: #ff9900;
  font-size: 36px;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
}

.config-sidebar button.active {
  background: #333333;
  border: 2px solid #fff;
}

.config-content {
  position: absolute;
  left: 430px;
  right: 210px;
  top: 40px;
  bottom: 0;
  display: flex;
  flex-direction: column;
}

.config-section-title {
  height: 80px;
  margin-left: 40px;
  color: #ff9900;
  font-size: 48px;
  display: flex;
  align-items: center;
}

.config-content > .line.thin {
  margin: 0 40px;
  background: #ff9900;
  height: 2px;
}

.config-form {
  margin: 0 40px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.config-form.dense {
  gap: 0;
}

.config-row {
  min-height: 100px;
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  align-items: center;
  column-gap: 0;
  color: #fff;
  font-size: 24px;
}

.config-label {
  width: 400px;
  padding-right: 30px;
}

.config-io-separator {
  height: 1px;
  background: #333333;
}

.config-io-button {
  width: 200px;
  height: 45px;
  padding: 0;
  border: none;
  color: #fff;
  font-size: 24px;
  font-family: "Noto Serif JP", "Noto Serif CJK JP", "MS Mincho", serif;
  cursor: pointer;
  justify-self: start;
  transition: filter 150ms linear;
}

.config-io-button.export {
  background: #ff9900;
}

.config-io-button.import {
  background: #4d4d4d;
}

.config-io-button:hover {
  filter: brightness(1.15);
}

.config-import-input {
  display: none;
}

.config-io-status {
  font-size: 20px;
  font-family: "Noto Serif JP", "Noto Serif CJK JP", "MS Mincho", serif;
  overflow-wrap: anywhere;
}

.config-input-control {
  width: 400px;
  height: 50px;
  border: 1px solid #333;
  background: #1a1a1a;
  color: #fff;
  font-size: 24px;
  padding: 0 12px;
  font-family: "Noto Serif JP", "Noto Serif CJK JP", "MS Mincho", serif;
  font-weight: 300;
}

.config-input-control:focus {
  outline: none;
  border-color: #ff9900;
}

.config-select-shell {
  position: relative;
  display: inline-flex;
  width: 400px;
  height: 50px;
}

.config-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
}

.config-select-arrow img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(62%) sepia(98%) saturate(1661%) hue-rotate(4deg) brightness(102%) contrast(103%);
}

.custom-select-trigger {
  width: 400px;
  height: 50px;
  border: 1px solid #333;
  background: #1a1a1a;
  color: #fff;
  font-size: 24px;
  padding: 0 40px 0 12px;
  font-family: "Noto Serif JP", "Noto Serif CJK JP", "MS Mincho", serif;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.custom-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  overflow-y: visible;
  background: #1a1a1a;
  border: 1px solid #333333;
  z-index: 100;
  box-sizing: border-box;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.custom-select-dropdown::-webkit-scrollbar {
  width: 6px;
}
.custom-select-dropdown::-webkit-scrollbar-track {
  background: #1a1a1a;
}
.custom-select-dropdown::-webkit-scrollbar-thumb {
  background: #555555;
  border-radius: 3px;
}

.custom-select-option {
  color: #fff;
  font-weight: 300;
  font-size: 24px;
  padding: 8px 12px;
  cursor: pointer;
  font-family: "Noto Serif JP", "Noto Serif CJK JP", "MS Mincho", serif;
}

.custom-select-option:hover {
  background: #333;
}

.config-checkbox-shell {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
}

.config-row.checkbox-row input[type="checkbox"] {
  appearance: none;
  width: 40px;
  height: 40px;
  background: #333;
  border: none;
  position: relative;
  cursor: pointer;
}

.config-row.checkbox-row input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 24px;
  height: 24px;
  background: #ff9900;
}

.slider-wrap {
  display: flex;
  align-items: center;
  gap: 300px;
  width: 680px;
}

.slider-wrap input[type="range"] {
  appearance: none;
  width: 300px;
  height: 20px;
  accent-color: #ff9900;
  background: transparent;
}

.slider-wrap input[type="range"]::-webkit-slider-runnable-track {
  height: 10px;
  background: linear-gradient(to right, #ff9900 var(--fill, 0%), #333 var(--fill, 0%));
}

.slider-wrap input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 40px;
  margin-top: -15px;
  background: #fff;
  border: none;
}

.slider-wrap input[type="range"]::-moz-range-track {
  height: 10px;
  background: #333;
}

.slider-wrap input[type="range"]::-moz-range-progress {
  height: 10px;
  background: #ff9900;
}

.slider-wrap input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 40px;
  background: #fff;
  border: none;
  border-radius: 0;
}

.slider-value {
  width: 80px;
  text-align: right;
  font-size: 36px;
}

.config-subtitle {
  color: #ff9900;
  font-size: 28px;
  font-weight: 700;
  min-height: 50px;
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.config-note {
  color: #aaa;
  font-size: 20px;
  line-height: 1.5;
  margin-top: 20px;
}

.config-freeapi-quota {
  margin-top: 20px;
  color: #fff;
  font-size: 22px;
  line-height: 1.6;
  font-family: "Noto Serif JP", "Noto Serif CJK JP", "MS Mincho", serif;
  overflow-wrap: anywhere;
}

.config-runtime {
  min-height: 100px;
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
}

.config-runtime .good {
  color: #66ff99;
}

.config-runtime .warn {
  color: #ffcc66;
}

.config-runtime .bad {
  color: #ff6666;
}

.config-footer {
  position: absolute;
  right: 100px;
  bottom: 60px;
  display: flex;
  gap: 50px;
  z-index: 3;
}

.config-footer button {
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
}

.config-footer .cancel {
  width: 210px;
  height: 70px;
  background: #4d4d4d;
}

.config-footer .apply {
  width: 260px;
  height: 70px;
  background: #ff9900;
}

.real-amadeus-root.mobile-root {
  min-height: 100dvh;
  display: block;
  padding: 0;
  overflow: hidden;
}

.mobile-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(env(safe-area-inset-top, 0px) + 56px);
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.2));
  z-index: 30;
}

.mobile-topbar-button {
  min-width: 104px;
  height: 36px;
  border: 1px solid rgba(255, 153, 0, 0.6);
  background: rgba(32, 12, 4, 0.88);
  color: #ffb347;
  font-family: "Eurostile", sans-serif;
  font-size: 18px;
  letter-spacing: 0.04em;
}

.mobile-topbar-status {
  flex: 1;
  min-width: 0;
  color: #f0f0f0;
  font-size: 14px;
  font-family: "Noto Serif JP", "MS Mincho", serif;
  font-weight: 300;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  text-align: right;
}

.mobile-topbar-status-inner {
  display: inline-block;
  white-space: nowrap;
}

.mobile-topbar-status.marquee .mobile-topbar-status-inner {
  display: inline-block;
  padding-left: 100%;
  animation: mobile-topbar-marquee 12s linear infinite;
}

@keyframes mobile-topbar-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.mobile-stage {
  position: absolute;
  inset: 0;
  padding-top: calc(env(safe-area-inset-top, 0px) + 56px);
}

.mobile-login-panel,
.mobile-loading-panel {
  position: fixed;
  inset: 0;
  padding: 40px 24px calc(env(safe-area-inset-bottom, 0px) + 40px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 18px;
  background: #0a0500;
  overflow: hidden;
  touch-action: none;
}

.mobile-login-logo {
  width: min(70vw, 280px);
  height: auto;
  align-self: center;
  margin-bottom: 24px;
}

.mobile-form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #ffd56a;
  font-size: 15px;
  font-family: "MateSC", serif;
  font-weight: 700;
}

.mobile-form-row input {
  height: 48px;
  border: 1px solid rgba(255, 153, 0, 0.6);
  background: rgba(20, 10, 0, 0.9);
  color: #ffd700;
  font-size: 18px;
  font-family: "MS Mincho", "Noto Serif JP", serif;
  font-weight: 400;
  letter-spacing: normal;
  padding: 0 16px;
  border-radius: 12px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5);
}

.mobile-password-mask-wrap {
  position: relative;
  height: 48px;
}

.mobile-password-mask-display {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 153, 0, 0.6);
  background: rgba(20, 10, 0, 0.9);
  color: #ffd700;
  font-size: 18px;
  font-family: "MS Mincho", "Noto Serif JP", serif;
  font-weight: 400;
  padding: 0 16px;
  border-radius: 12px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  white-space: pre;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.mobile-form-row input.mobile-password-masked-input {
  position: relative;
  width: 100%;
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: #ffd700;
  z-index: 2;
}

.mobile-form-error {
  color: #ff4444;
  font-size: 16px;
  font-family: "MateSC", serif;
  font-weight: 700;
  min-height: 22px;
  text-align: center;
}

.mobile-primary-button {
  height: 56px;
  border: 1px solid rgba(255, 153, 0, 0.6);
  background: linear-gradient(to right, rgba(40, 15, 0, 0.9), rgba(20, 5, 0, 0.95));
  color: #ffcc00;
  font-family: "MateSC", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 12px;
  margin-top: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  transition: transform 0.1s;
}
.mobile-primary-button:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
}

.mobile-login-skip-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 8px;
}

.mobile-login-skip-message {
  color: #ffd700;
  font-size: 18px;
  font-family: "Noto Serif JP", "Noto Serif CJK JP", "MS Mincho", serif;
  font-weight: 300;
  text-align: center;
  line-height: 1.5;
}

.mobile-login-skip-button {
  width: 65px;
  height: 65px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.mobile-login-skip-button img {
  width: 100%;
  height: 100%;
}

.mobile-loading-title {
  color: #ffb347;
  text-align: center;
  font-family: "Eurostile", sans-serif;
  font-size: 34px;
}

.mobile-loading-line {
  color: #ff6666;
  text-align: center;
  font-family: "Noto Serif JP", "MS Mincho", serif;
  font-size: 20px;
}

.mobile-settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 3000;
  display: flex;
  align-items: flex-end;
}

.mobile-settings-sheet {
  width: 100%;
  max-height: calc(100dvh - env(safe-area-inset-top, 0px));
  background: #171717;
  border-top: 1px solid rgba(255, 153, 0, 0.4);
  padding: 20px 20px calc(env(safe-area-inset-bottom, 0px) + 20px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-settings-title {
  color: #ff9900;
  font-family: "Eurostile", sans-serif;
  font-size: 26px;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.mobile-settings-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #ddd;
  font-size: 16px;
  font-family: "Noto Serif JP", "MS Mincho", serif;
  font-weight: 300;
}

.mobile-settings-row.checkbox {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.mobile-settings-row input,
.mobile-settings-row select,
.mobile-settings-textarea {
  border: 1px solid rgba(255, 153, 0, 0.3);
  background: #111;
  color: #fff;
  font-size: 17px;
  min-height: 46px;
  padding: 10px 12px;
  font-family: "Noto Serif JP", "MS Mincho", serif;
  border-radius: 4px;
}

.mobile-settings-textarea {
  min-height: 100px;
  resize: vertical;
  font-family: "DepartureMono", monospace;
  font-size: 15px;
}

.mobile-settings-freeapi-quota {
  color: #fff;
  font-size: 18px;
  line-height: 1.6;
  font-family: "Noto Serif JP", "MS Mincho", serif;
  font-weight: 300;
  overflow-wrap: anywhere;
}

.mobile-settings-actions {
  display: flex;
  gap: 14px;
  margin-top: 6px;
}

.mobile-settings-actions button {
  flex: 1;
  height: 50px;
  border: none;
  font-size: 18px;
  font-family: "Noto Serif JP", "MS Mincho", serif;
  border-radius: 4px;
}

.mobile-settings-actions .secondary {
  background: #444;
  color: #eee;
}

.mobile-settings-actions .primary {
  background: #ff9900;
  color: #1f1200;
  font-weight: 700;
}

.mobile-root {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  touch-action: none;
}

.mobile-root .chat-panel-root {
  position: absolute;
  inset: calc(env(safe-area-inset-top, 0px) + 56px) 0 0 0;
  animation: none;
}

.mobile-root .live2d-host {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.mobile-root .live2d-host canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  object-position: center center;
  transform: none;
  pointer-events: auto;
}

.mobile-root .dialogue-panel {
  left: 16px;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  height: auto;
  min-height: 250px;
  max-height: 50%;
  border-radius: 16px;
  border: 1px solid rgba(255, 153, 0, 0.6);
  background: linear-gradient(to bottom, rgba(30, 10, 0, 0.85), rgba(10, 2, 0, 0.95));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  box-sizing: border-box;
}

.mobile-root .name-text {
  top: 16px;
  left: 20px;
  transform: none;
  width: auto;
  height: auto;
  font-size: 20px;
  font-family: "Noto Serif JP", "MS Mincho", serif;
  font-weight: 700;
  color: #ffcc00;
}

.mobile-root .dialogue-text {
  left: 20px;
  right: 20px;
  top: 50px;
  bottom: 38px;
  width: auto;
  height: auto;
  transform: none;
  font-size: 19px;
  line-height: 1.6;
  overflow-y: auto;
  overflow-x: hidden;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
  box-sizing: border-box;
  font-family: "Noto Serif JP", "MS Mincho", serif;
  font-weight: 300;
}

.mobile-root .waiting-indicator {
  left: auto;
  right: 20px;
  top: auto;
  bottom: 12px;
  width: auto;
  height: auto;
  font-size: 18px;
}

.mobile-root .input-panel {
  left: 16px;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  height: 64px;
  border-radius: 32px;
  padding: 10px 104px 10px 16px;
  background: linear-gradient(to right, rgba(40, 15, 0, 0.9), rgba(20, 5, 0, 0.95));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 153, 0, 0.7);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.mobile-root .input-panel.has-audio-input {
  padding-right: 152px;
}

.mobile-root .chat-input {
  font-size: 20px;
  font-family: "Noto Serif JP", "MS Mincho", serif;
  font-weight: 300;
}

.mobile-root .chat-send-button {
  display: block;
  width: 84px;
  height: 44px;
  font-size: 18px;
  border-radius: 22px;
  background: #ff9900;
  color: #1a0c00;
  font-weight: 700;
  border: none;
}

.mobile-root .chat-input-actions {
  right: 10px;
  top: 10px;
}

.mobile-root .chat-mic-button {
  width: 44px;
  height: 44px;
  font-size: 22px;
  border-radius: 22px;
}

.mobile-root .auto-text {
  width: auto;
  left: auto;
  right: 14px;
  top: 10px;
  font-size: 30px;
}

.mobile-topbar-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-root .dialog-overlay.backlog-panel {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  background: rgba(10, 5, 0, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  overflow: hidden;
  box-sizing: border-box;
}

.mobile-root .backlog-panel .overlay-header {
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px 8px;
  height: auto;
  flex-shrink: 0;
}

.mobile-root .backlog-panel .overlay-header h2 {
  font-size: 24px;
  height: auto;
  color: #ff9900;
  letter-spacing: 0.1em;
}

.mobile-root .backlog-panel .backlog-content {
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  padding: 12px 14px;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  touch-action: pan-y;
  scrollbar-gutter: auto;
  box-sizing: border-box;
}

.mobile-root .backlog-panel .backlog-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.45;
  background: rgba(255, 153, 0, 0.06);
  border-radius: 12px;
  border: 1px solid rgba(255, 153, 0, 0.2);
  border-left: 4px solid #ff9900;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.mobile-root .backlog-panel .backlog-row.backlog-row-user,
.mobile-root .backlog-panel .backlog-row.backlog-row-me {
  border-left: 1px solid rgba(255, 153, 0, 0.2);
  border-right: 4px solid #ffcc00;
  background: rgba(255, 204, 0, 0.08);
}

.mobile-root .backlog-panel .backlog-name {
  position: static;
  width: auto;
  top: auto;
  left: auto;
  font-size: 13px;
  font-weight: 700;
  padding-top: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  min-width: 0;
  max-width: 100%;
  flex-shrink: 0;
}

.mobile-root .backlog-panel .backlog-message {
  margin-left: 0;
  font-size: 15px;
  padding-top: 0;
  color: #f0f0f0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.mobile-root .backlog-panel .overlay-close-button {
  position: relative;
  right: auto;
  bottom: auto;
  flex-shrink: 0;
  margin: 10px 14px calc(env(safe-area-inset-bottom, 0px) + 12px);
  width: calc(100% - 28px);
  height: 46px;
  font-size: 17px;
  font-weight: 700;
  border-radius: 23px;
  background: #ff9900;
  color: #1a0c00;
  box-shadow: 0 4px 16px rgba(255, 153, 0, 0.3);
}

/* ==========================================
   Mobile Overrides for Mini Game and Achievements
   ========================================== */
@media (pointer: coarse), (max-width: 900px) {
  /* Common mobile overlay overrides */
  .mobile-root .overlay-panel.achievement-panel {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100dvh;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    background: rgba(10, 5, 0, 0.98);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    overflow: hidden;
    box-sizing: border-box;
  }

  /* Achievements Mobile Layout */
  .mobile-root .achievement-panel-title {
    position: relative;
    top: 0;
    left: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px 8px;
    font-size: 24px;
    height: auto;
    color: #ff9900;
    letter-spacing: 0.1em;
    z-index: 2;
  }

  .mobile-root .achievement-panel-progress {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 20px);
    right: 20px;
    font-size: 16px;
    z-index: 2;
  }

  .mobile-root .achievement-list {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    flex: 1 1 auto;
    padding: 12px 16px;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    touch-action: pan-y;
    box-sizing: border-box;
  }

  .mobile-root .achievement-row {
    height: auto;
    min-height: 72px;
    padding: 10px 12px;
    border-radius: 8px;
    gap: 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    box-sizing: border-box;
  }

  .mobile-root .achievement-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 18px;
    font-size: 20px;
    margin-left: 0;
  }

  .mobile-root .achievement-text {
    margin: 0;
    gap: 2px;
    flex: 1;
    min-width: 0;
  }

  .mobile-root .achievement-row-title {
    font-size: 16px;
  }

  .mobile-root .achievement-row-desc {
    font-size: 12px;
    white-space: normal;
    word-break: break-word;
    text-overflow: clip;
    overflow: visible;
  }

  .mobile-root .achievement-date {
    position: absolute;
    right: 12px;
    bottom: 6px;
    font-size: 10px;
    color: #888888;
    width: auto;
    min-width: 0;
    text-align: right;
    margin-right: 0;
  }

  .mobile-root .achievement-panel .overlay-close-button {
    position: relative;
    right: auto;
    bottom: auto;
    flex-shrink: 0;
    margin: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
    width: calc(100% - 32px);
    height: 46px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 23px;
    background: #ff9900;
    color: #1a0c00;
    box-shadow: 0 4px 16px rgba(255, 153, 0, 0.3);
  }

  /* Mini Game Mobile Layout */
  .mobile-root .mini-game-panel {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    width: 100vw;
    height: 46% !important; /* Constrain to bottom half safely */
    background: rgba(12, 6, 0, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 2px solid #ff9900;
    border-radius: 16px 16px 0 0;
    z-index: 3000 !important;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.7);
  }

  .mobile-root .mini-game-title {
    position: relative;
    top: 0;
    left: 0;
    padding: 12px 20px 4px;
    font-size: 20px;
    height: auto;
    color: #ff9900;
    letter-spacing: 0.1em;
    z-index: 2;
  }

  .mobile-root .mini-game-content {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    flex: 1 1 auto;
    padding: 6px 16px 8px; /* Slightly tighter spacing */
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }

  .mobile-root .mini-game-menu,
  .mobile-root .mini-game-playing,
  .mobile-root .mini-game-result {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  .mobile-root .mini-game-menu {
    justify-content: center;
    align-items: center;
    gap: 16px;
  }

  .mobile-root .mg-menu-title {
    font-size: 22px;
  }

  .mobile-root .mg-menu-desc {
    font-size: 14px;
    color: #cccccc;
    padding: 0 10px;
  }

  .mobile-root .mg-start-button {
    width: 180px;
    height: 44px;
    font-size: 18px;
    border-radius: 22px;
  }

  .mobile-root .mini-game-playing {
    gap: 6px;
  }

  .mobile-root .mg-header {
    margin-bottom: 2px;
  }

  .mobile-root .mg-question-counter,
  .mobile-root .mg-score-label {
    font-size: 14px;
  }

  .mobile-root .mg-question-box {
    font-size: 15px;
    height: auto;
    min-height: 52px;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 2px;
    line-height: 1.4;
  }

  .mobile-root .mg-answers {
    grid-template-columns: 1fr 1fr; /* 2 columns to fit in bottom half */
    gap: 6px;
  }

  .mobile-root .mg-answer {
    height: 38px; /* Tighter answer button height */
    min-height: 38px;
    padding: 4px 10px;
    border-radius: 6px;
  }

  .mobile-root .mg-answer-text {
    font-size: 13px;
    white-space: normal;
    text-overflow: clip;
    overflow: visible;
    line-height: 1.3;
    text-align: center;
  }

  .mobile-root .mg-spacer {
    display: none;
  }

  .mobile-root .mg-next-button {
    align-self: center;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 38px;
    padding: 6px 16px;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 700;
    white-space: normal;
    border-radius: 19px;
    margin-top: 6px;
  }

  .mobile-root .mini-game-result {
    justify-content: center;
    align-items: center;
    gap: 16px;
  }

  .mobile-root .mg-result-title {
    font-size: 24px;
  }

  .mobile-root .mg-score-result {
    font-size: 20px;
  }

  .mobile-root .mg-result-comment {
    font-size: 15px;
    padding: 0 10px;
    line-height: 1.35;
  }

  .mobile-root .mg-result-buttons {
    flex-direction: row;
    width: 100%;
    gap: 10px;
    padding: 0;
    box-sizing: border-box;
  }

  .mobile-root .mg-retry-button,
  .mobile-root .mg-menu-back-button {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 40px;
    padding: 6px 14px;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 700;
    white-space: normal;
    border-radius: 20px;
  }

  /* Inline comment bubble floats above minigame sheet (in front of Live2D) */
  .mobile-root .mg-comment-bubble {
    position: absolute;
    left: 16px;
    right: 16px;
    top: -125px; /* Adjusted to sit nicely above the bottom sheet and match shifted Live2D position */
    bottom: auto;
    width: auto;
    max-width: none;
    margin: 0;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(45, 15, 0, 0.95);
    border: 1px solid rgba(255, 153, 0, 0.4);
    box-sizing: border-box;
    line-height: 1.45;
    z-index: 3100;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  }

  /* Close button on the top right of bottom sheet */
  .mobile-root .mg-close-button {
    position: absolute !important;
    right: 16px !important;
    top: 10px !important;
    left: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: 28px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 0 12px !important;
    margin: 0 !important;
    border-radius: 14px !important;
    background: #ff9900 !important;
    color: #1a0c00 !important;
    line-height: 28px !important;
    box-shadow: none !important;
    z-index: 10;
  }

  /* Mobile floating trigger buttons - raised bottom to not overlap input panel */
  .mobile-root .mini-game-button,
  .mobile-root .mobile-achievements-trigger-button {
    display: block;
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 88px) !important; /* Raised to not overlap 64px height + 12px bottom input panel */
    width: 140px;
    height: 38px;
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    border-radius: 19px;
    background: rgba(20, 10, 0, 0.85);
    border: 1px solid rgba(255, 153, 0, 0.6);
    color: #ff9900;
    font-family: "Eurostile", "Noto Serif JP", sans-serif;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: background 150ms ease, border-color 150ms ease;
  }

  .mobile-root .mini-game-button {
    left: 16px;
    right: auto;
  }

  .mobile-root .mobile-achievements-trigger-button {
    right: 16px;
    left: auto;
  }

  /* Shift Live2D model upward during quiz to keep Kurisu's face fully visible */
  .mobile-root .live2d-shift.live2d-shifted {
    transform: translateY(-14dvh) scale(0.85) !important;
    transform-origin: top center !important;
    transition: transform 450ms cubic-bezier(0.645, 0.045, 0.355, 1);
  }
}

/* First-launch Display Language Picker */
.language-select-panel {
  position: absolute;
  inset: 35px 0 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 44px;
  padding: 40px 60px;
  box-sizing: border-box;
  background: rgba(10, 4, 0, 0.86);
}

.lang-select-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.lang-select-title {
  color: #ff9900;
  font-size: 100px;
  font-family: "MS Mincho", "Noto Serif JP", serif;
  letter-spacing: 0.1em;
  line-height: 1.1;
  font-weight: 400;
  white-space: nowrap;
}

.lang-select-subtitle {
  color: #d8c6a8;
  font-size: 34px;
  font-family: "Noto Serif JP", "Noto Serif CJK JP", "MS Mincho", serif;
  font-weight: 300;
  line-height: 1.3;
}

.lang-select-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  width: 100%;
  max-width: 1520px;
}

.lang-select-button {
  width: 284px;
  min-height: 76px;
  box-sizing: border-box;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  background: rgba(24, 12, 0, 0.92);
  border: 1px solid rgba(255, 153, 0, 0.55);
  border-radius: 6px;
  color: #fff;
  font-size: 24px;
  font-family: "Noto Serif JP", "Noto Serif CJK JP", "Noto Serif CJK KR", "MS Mincho", "Liberation Sans", serif;
  line-height: 1.25;
  cursor: pointer;
  transition: background 150ms linear, border-color 150ms linear, box-shadow 150ms linear, transform 150ms linear;
}

.lang-select-button:hover,
.lang-select-button:focus-visible {
  background: rgba(255, 153, 0, 0.22);
  border-color: #ff9900;
  box-shadow: 0 0 18px rgba(255, 153, 0, 0.35);
  transform: translateY(-2px);
  outline: none;
}

.lang-select-button:active {
  transform: translateY(0);
}

.lang-select-flag {
  width: 45px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  display: block;
}

.lang-select-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.mobile-root .language-select-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #0a0500;
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 16px calc(env(safe-area-inset-bottom, 0px) + 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-root .lang-select-header {
  gap: 8px;
}

.mobile-root .lang-select-title {
  font-size: 24px;
  letter-spacing: 0.1em;
  white-space: normal;
}

.mobile-root .lang-select-subtitle {
  font-size: 14px;
  line-height: 1.4;
}

.mobile-root .lang-select-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 440px;
}

.mobile-root .lang-select-button {
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  gap: 10px;
  border-radius: 10px;
  font-size: 15px;
}

.mobile-root .lang-select-button:hover {
  transform: none;
}

.mobile-root .lang-select-flag {
  width: 30px;
  height: 20px;
}

