/* ============================================================
   LOSTZONE Manual Tester - Common Styles
   \u5171\u901a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\uff1a\u5909\u6570\u3001\u57fa\u672c\u30b9\u30bf\u30a4\u30eb\u3001\u30ab\u30fc\u30c9\u3001\u30dc\u30bf\u30f3\u3001\u30e2\u30fc\u30c0\u30eb\u3001\u30d8\u30c3\u30c0\u30fc
   \u30b9\u30af\u30ed\u30fc\u30eb\u30d0\u30fc\u975e\u8868\u793a\u7248
   ============================================================ */

/* ============================================================
   CSS Variables\uff08\u30ab\u30e9\u30fc\u30d1\u30ec\u30c3\u30c8\uff09
   ============================================================ */
:root {
  --bg: #0b0f14;
  --panel: #121821;
  --ink: #eaf1ff;
  --muted: #9bb1d6;
  --accent: #4aa8ff;
  --ok: #8bff9b;
  --warn: #ffd36b;
  --danger: #ff5c7c;
  --red: #ff5c7c;
  --blue: #4aa8ff;
  --green: #8bff9b;
}

/* ============================================================
   \u57fa\u672c\u30b9\u30bf\u30a4\u30eb
   ============================================================ */
* {
  box-sizing: border-box;
  touch-action: manipulation; /* \u30c0\u30d6\u30eb\u30bf\u30c3\u30d7\u30ba\u30fc\u30e0\u3092\u7121\u52b9\u5316 */
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Noto Sans JP', sans-serif;
  background: linear-gradient(180deg, #0b0f14, #0e1622 60%, #0b0f14);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
  /* \u30b9\u30af\u30ed\u30fc\u30eb\u30d0\u30fc\u975e\u8868\u793a\uff08\u6a5f\u80fd\u306f\u7dad\u6301\uff09 */
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE, Edge */
}

body::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

/* \u80cc\u666f\u753b\u50cf\uff08\u30d7\u30ec\u30a4\u30de\u30c3\u30c8\u98a8\uff09 */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  opacity: 0.25;
  z-index: -2;
}

/* \u80cc\u666f\u306e\u30aa\u30fc\u30d0\u30fc\u30ec\u30a4\uff08\u30b0\u30ea\u30c3\u30c9\u52b9\u679a\uff09 */
body::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(0deg, rgba(74, 168, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 168, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  z-index: -1;
  pointer-events: none;
}

/* ============================================================
   \u30d8\u30c3\u30c0\u30fc
   ============================================================ */
header {
  padding: 12px 16px;
  border-bottom: 1px solid #1d2633;
  background: #0c141f;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* &#12504;&#12483;&#12480;&#12540;&#12508;&#12479;&#12531;&#65288;&#12452;&#12531;&#12488;&#12525;&#12539;&#12466;&#12540;&#12512;&#12471;&#12473;&#12486;&#12512;&#65289; */
.intro-button,
.game-system-button {
  padding: 8px 16px;
  background: rgba(74, 168, 255, 0.15);
  border: 2px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.intro-button:hover,
.game-system-button:hover {
  background: rgba(74, 168, 255, 0.25);
  box-shadow: 0 0 12px rgba(74, 168, 255, 0.3);
  transform: translateY(-1px);
}

header h1 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.game-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.version {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.header-divider {
  color: var(--muted);
  font-size: 14px;
  font-weight: 300;
}

.phase-display {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phase-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.phase-text {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.test-settings {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.chapter-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.chapter-select-compact {
  padding: 4px 10px;
  background: var(--panel);
  border: 1px solid #28435f;
  border-radius: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.chapter-select-compact:hover {
  border-color: var(--accent);
  background: #1a2332;
}

.chapter-select-compact:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(74, 168, 255, 0.2);
}

/* ============================================================
   &#12467;&#12531;&#12486;&#12490;
   ============================================================ */
.container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 20px;
}

/* &#12489;&#12521;&#12501;&#12488;&#36984;&#25246;&#30011;&#38754;&#12434;&#20013;&#22ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Â 'ÃƒÆ’Ã†â€™ÃƒÂ¢Ã¢â€šÂ¬Ã‚Â ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â‚¬Å¾Ã‚Â¢ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã‚Â¡ÃƒÆ’Ã†â€™ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â¯ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Â 'ÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡Ãƒâ€šÃ‚Â¬ÃƒÆ’Ã¢â‚¬Â¦Ãƒâ€šÃ‚Â¡ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã‚Â¡ÃƒÆ’Ã†â€™ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â¿ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Â 'ÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡Ãƒâ€šÃ‚Â¬ÃƒÆ’Ã¢â‚¬Â¦Ãƒâ€šÃ‚Â¡ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã‚Â¡ÃƒÆ’Ã†â€™ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â½;&#37197;&#32622;&#65288;5%&#19978;&#12395;&#12458;&#12501;&#12475;&#12483;&#12488;&#65289; */
#exSelectScreen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 70px);
  transform: translateY(-5%);
}

/* &#12466;&#12540;&#12512;&#30011;&#38754;&#12434;&#20013;&#22ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Â 'ÃƒÆ’Ã†â€™ÃƒÂ¢Ã¢â€šÂ¬Ã‚Â ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â‚¬Å¾Ã‚Â¢ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã‚Â¡ÃƒÆ’Ã†â€™ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â¯ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Â 'ÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡Ãƒâ€šÃ‚Â¬ÃƒÆ’Ã¢â‚¬Â¦Ãƒâ€šÃ‚Â¡ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã‚Â¡ÃƒÆ’Ã†â€™ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â¿ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Â 'ÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡Ãƒâ€šÃ‚Â¬ÃƒÆ’Ã¢â‚¬Â¦Ãƒâ€šÃ‚Â¡ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã‚Â¡ÃƒÆ’Ã†â€™ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â½;&#37197;&#32622; */
#gameScreen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 70px);
}

/* ============================================================
   \u30ab\u30fc\u30c9\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8
   ============================================================ */
.card {
  background: var(--panel);
  border: 1px solid #1d2633;
  border-radius: 14px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.card-header {
  padding: 12px 16px;
  border-bottom: 1px solid #1d2633;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  /* &#12473;&#12463;&#12525;&#12540;&#12523;&#12496;&#12540;&#38750;&#34920;&#31034;&#65288;&#27231;&#33021;&#12399;&#32173;&#25345;&#65289; */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE, Edge */
}

.card-header::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.header-player-stats {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.header-player-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(11, 15, 20, 0.6);
  border-radius: 6px;
  border: 1px solid #28435f;
  font-size: 12px;
}

.header-player-stat.player-a-stat {
  border-color: rgba(255, 92, 124, 0.4);
  background: rgba(255, 92, 124, 0.08);
}

.header-player-stat.player-b-stat {
  border-color: rgba(74, 168, 255, 0.4);
  background: rgba(74, 168, 255, 0.08);
}

.stat-player-label {
  font-weight: 700;
  color: var(--accent);
  font-size: 11px;
}

.stat-mini {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}

.stat-mini span {
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
}

/* \u30ab\u30fc\u30c9\u30d8\u30c3\u30c0\u30fc\u5185\u306e\u30b2\u30fc\u30e0\u30b9\u30c6\u30fc\u30bf\u30b9 */
.game-stats-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: rgba(11, 15, 20, 0.6);
  border-radius: 6px;
  border: 1px solid #28435f;
  flex-shrink: 0;
}

.header-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid;
  min-width: 50px;
  transition: all 0.2s;
}

.header-stat.en-stat {
  background: rgba(74, 168, 255, 0.08);
  border-color: rgba(74, 168, 255, 0.4);
}

.header-stat.sv-stat {
  background: rgba(139, 255, 155, 0.08);
  border-color: rgba(139, 255, 155, 0.4);
}

.header-stat.bug-stat {
  background: rgba(255, 213, 107, 0.08);
  border-color: rgba(255, 213, 107, 0.4);
}

.header-stat.hp-stat {
  background: rgba(255, 92, 124, 0.08);
  border-color: rgba(255, 92, 124, 0.4);
}

.header-stat.skill-counter-stat {
  background: rgba(255, 215, 0, 0.08);
  border-color: rgba(255, 215, 0, 0.4);
}

.header-stat:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(74, 168, 255, 0.3);
}

.header-stat-label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-stat-value {
  font-size: 14px;
  color: var(--ink);
  font-weight: 700;
  text-align: center;
}

.destroyed-facilities-inline {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(255, 92, 124, 0.08);
  border: 1px solid rgba(255, 92, 124, 0.3);
  border-radius: 6px;
  flex-shrink: 0;
}

.destroyed-label {
  font-size: 10px;
  color: var(--danger);
  font-weight: 700;
  text-transform: uppercase;
}

.destroyed-list {
  font-size: 11px;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

.card-body {
  padding: 16px;
}

/* ============================================================
   \u7ae0\u9078\u629e\u30bb\u30af\u30b7\u30e7\u30f3
   ============================================================ */
.chapter-select {
  margin-bottom: 16px;
  padding: 12px;
  background: #0e1724;
  border: 1px solid #28435f;
  border-radius: 10px;
}

.chapter-select label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.chapter-select select {
  width: 100%;
  padding: 10px 14px;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid #28435f;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.chapter-select select:hover {
  border-color: var(--accent);
  background: #1a2332;
}

.chapter-select select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(74, 168, 255, 0.2);
}

/* ============================================================
   \u30dc\u30bf\u30f3
   ============================================================ */
.btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  min-height: 40px;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover:not(:disabled) {
  background: #5db8ff;
}

.btn-success {
  background: var(--ok);
  color: var(--bg);
}

.btn-success:hover:not(:disabled) {
  background: #a0ffad;
}

.btn-warning {
  background: var(--warn);
  color: var(--bg);
}

.btn-warning:hover:not(:disabled) {
  background: #ffdf85;
}

.btn-danger {
  background: var(--danger);
  color: var(--ink);
}

.btn-danger:hover:not(:disabled) {
  background: #ff7691;
}

.btn-secondary {
  background: #28435f;
  color: var(--ink);
}

.btn-secondary:hover:not(:disabled) {
  background: #35546f;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(74, 168, 255, 0.1);
}

/* ============================================================
   \u30d0\u30c3\u30b8
   ============================================================ */
.badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.badge.badge-en {
  background: rgba(74, 168, 255, 0.15);
  color: var(--blue);
  border: 1px solid var(--blue);
}

.badge.badge-sv {
  background: rgba(139, 255, 155, 0.15);
  color: var(--green);
  border: 1px solid var(--green);
}

.badge.badge-bug {
  background: rgba(255, 213, 107, 0.15);
  color: var(--warn);
  border: 1px solid var(--warn);
}

.badge.badge-hp {
  background: rgba(255, 92, 124, 0.15);
  color: var(--red);
  border: 1px solid var(--red);
}

.badge.badge-active {
  background: rgba(74, 168, 255, 0.15);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.badge.badge-inactive {
  background: rgba(155, 177, 214, 0.15);
  color: var(--muted);
  border: 1px solid var(--muted);
}

/* ============================================================
   \u30e2\u30fc\u30c0\u30eb
   ============================================================ */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--panel);
  border: 1px solid #1d2633;
  border-radius: 14px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  /* \u30b9\u30af\u30ed\u30fc\u30eb\u30d0\u30fc\u975e\u8868\u793a\uff08\u6a5f\u80fd\u306f\u7dad\u6301\uff09 */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE, Edge */
}

.modal-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.modal-header {
  padding: 16px;
  border-bottom: 1px solid #1d2633;
  font-weight: 600;
}

.modal-body {
  padding: 16px;
}

.modal-footer {
  padding: 16px;
  border-top: 1px solid #1d2633;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ============================================================
   \u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u30c7\u30b6\u30a4\u30f3 - \u6a2a\u753b\u9762\u91cd\u8996
   ============================================================ */

/* \u30bf\u30d6\u30ec\u30c3\u30c8\u6a2a\u753b\u9762 (1024px\u4ee5\u4e0b) */
@media (max-width: 1024px) {
  .container {
    max-width: 100%;
    padding: 16px;
  }
  
  header {
    padding: 10px 14px;
  }
  
  .game-title {
    font-size: 16px;
  }
  
  .version {
    font-size: 11px;
  }
  
  /* \u30bf\u30c3\u30c1\u30bf\u30fc\u30b2\u30c3\u30c8\u30b5\u30a4\u30ba\u6700\u9069\u5316 (44px\u4ee5\u4e0a) */
  .btn {
    min-height: 44px;
    padding: 12px 18px;
    font-size: 14px;
  }
  
  .chapter-select-compact {
    min-height: 44px;
    padding: 8px 12px;
  }
  
  /* \u30e2\u30fc\u30c0\u30eb\u30b5\u30a4\u30ba\u8abf\u6574 */
  .modal-content {
    max-width: 90%;
    width: 90%;
  }
}

/* \u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\u6a2a\u753b\u9762 & \u30bf\u30d6\u30ec\u30c3\u30c8\u7e26\u753b\u9762 (768px\u4ee5\u4e0b) */
@media (max-width: 768px) {
  .container {
    padding: 12px;
  }
  
  header {
    padding: 8px 12px;
  }
  
  header h1 {
    font-size: 13px;
  }
  
  .version {
    font-size: 10px;
  }
  
  .game-title {
    font-size: 14px;
  }
  
  .header-content {
    gap: 6px;
  }
  
  /* \u6a2a\u753b\u9762\u3067\u306f\u30d8\u30c3\u30c0\u30fc\u3092\u6298\u308a\u8fd4\u3055\u306a\u3044 */
  .header-divider {
    font-size: 12px;
  }
  
  .phase-display {
    flex-shrink: 0;
  }
  
  .phase-text {
    font-size: 12px;
  }
  
  .test-settings {
    flex-shrink: 0;
  }
  
  .chapter-select-compact {
    font-size: 11px;
    min-height: 40px;
  }
  
  .instruction-block {
    font-size: 12px;
    padding: 12px 14px;
  }
  
  /* \u30ab\u30fc\u30c9\u30d8\u30c3\u30c0\u30fc\u306e\u6a2a\u753b\u9762\u6700\u9069\u5316 */
  .card-header {
    padding: 8px 10px;
    gap: 4px;
    font-size: 11px;
  }
  
  .badge {
    font-size: 9px;
    padding: 2px 6px;
  }
  
  .header-player-stats {
    gap: 4px;
  }
  
  .header-player-stat {
    padding: 4px 8px;
    font-size: 10px;
    gap: 4px;
    min-height: 32px;
  }
  
  .stat-player-label {
    font-size: 9px;
  }
  
  .stat-mini {
    font-size: 9px;
    gap: 2px;
  }
  
  .stat-mini span {
    font-size: 10px;
  }
  
  .game-stats-inline {
    gap: 3px;
    padding: 4px 6px;
  }
  
  .header-stat {
    padding: 4px 8px;
    min-width: 44px;
    gap: 3px;
    min-height: 32px;
  }
  
  .header-stat-label {
    font-size: 9px;
  }
  
  .header-stat-value {
    font-size: 11px;
  }
  
  .destroyed-facilities-inline {
    padding: 4px 8px;
  }
  
  .destroyed-label {
    font-size: 9px;
  }
  
  .destroyed-list {
    font-size: 10px;
  }
  
  /* \u30dc\u30bf\u30f3\u30bf\u30c3\u30c1\u30b5\u30a4\u30ba */
  .btn {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 13px;
  }
  
  /* \u30e2\u30fc\u30c0\u30eb\u6a2a\u753b\u9762\u5bfe\u5fdc */
  .modal-content {
    max-width: 95%;
    width: 95%;
    max-height: 85vh;
  }
}

/* \u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\u6a2a\u753b\u9762\u5c02\u7528 (768px\u4ee5\u4e0b & landscape) */
@media (max-width: 768px) and (orientation: landscape) {
  header {
    padding: 6px 10px;
  }
  
  header h1 {
    font-size: 12px;
  }
  
  .game-title {
    font-size: 13px;
  }
  
  .version {
    font-size: 9px;
  }
  
  .container {
    padding: 8px;
  }
  
  /* \u6a2a\u753b\u9762\u3067\u9ad8\u3055\u3092\u7bc0\u7d04 */
  .card {
    margin-bottom: 8px;
  }
  
  .card-body {
    padding: 12px;
  }
  
  .modal-content {
    max-height: 90vh;
  }
}

/* \u5c0f\u578b\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3 (480px\u4ee5\u4e0b) */
@media (max-width: 480px) {
  .container {
    padding: 8px;
  }
  
  header {
    padding: 6px 8px;
  }
  
  header h1 {
    font-size: 11px;
  }
  
  .game-title {
    font-size: 13px;
  }
  
  .version {
    font-size: 9px;
  }
  
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .header-divider {
    display: none;
  }
  
  .phase-display {
    width: 100%;
  }
  
  .test-settings {
    margin-left: 0;
    width: 100%;
  }
  
  .chapter-select-compact {
    flex: 1;
  }
  
  .card-header {
    padding: 6px 8px;
    gap: 4px;
    font-size: 10px;
    flex-wrap: wrap;
  }
  
  .header-player-stat {
    padding: 3px 6px;
    font-size: 9px;
    gap: 2px;
    min-height: 28px;
  }
  
  .stat-player-label {
    font-size: 8px;
  }
  
  .stat-mini {
    font-size: 8px;
    gap: 2px;
  }
  
  .stat-mini span {
    font-size: 9px;
  }
  
  .header-stat {
    padding: 3px 6px;
    min-width: 38px;
    gap: 2px;
    min-height: 28px;
  }
  
  .header-stat-label {
    font-size: 8px;
  }
  
  .header-stat-value {
    font-size: 10px;
  }
}

/* \u8d85\u5c0f\u578b\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3 (360px\u4ee5\u4e0b) */
@media (max-width: 360px) {
  .container {
    padding: 6px;
  }
  
  header {
    padding: 5px 6px;
  }
  
  .game-title {
    font-size: 12px;
  }
  
  .version {
    font-size: 8px;
  }
  
  .card-header {
    padding: 5px 6px;
    font-size: 9px;
  }
  
  .instruction-block {
    font-size: 11px;
    padding: 10px 12px;
  }
}

/* ============================================================
   \u30c9\u30e9\u30d5\u30c8\u8aac\u660e
   ============================================================ */
.draft-instructions {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.instruction-block {
  background: rgba(234, 241, 255, 0.05);
  border: 1px solid #2a3952;
  border-radius: 10px;
  padding: 14px 16px;
  line-height: 1.7;
  font-size: 14px;
  color: var(--ink);
}

.instruction-block p {
  margin: 0;
}

.instruction-block.warning {
  background: rgba(255, 211, 107, 0.08);
  border-color: var(--warn);
  border-width: 2px;
}

.instruction-block.warning p {
  color: var(--warn);
  font-weight: 600;
}

.instruction-block.tip {
  background: rgba(139, 255, 155, 0.08);
  border-color: var(--green);
  border-width: 2px;
}

.instruction-block.tip p {
  color: var(--green);
  font-weight: 600;
}
