/* Isolated styles for 2026-12-02 inner-page expansion (Gyms & Friend Codes).
   Inherits Monomyth Pikachu-yellow / charcoal palette from frozen /style.css without touching legacy assets. */

.ex1202-page,
.ex1202-page *,
.ex1202-page *::before,
.ex1202-page *::after {
  box-sizing: border-box;
}

.ex1202-page {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 3vw, 2rem) 3.5rem;
  overflow-wrap: anywhere;
}

.ex1202-page > *,
.ex1202-tool > *,
.ex1202-tool-top > *,
.ex1202-progress-strip > *,
.ex1202-controls > *,
.ex1202-add-form > *,
.ex1202-gym-grid > *,
.ex1202-gym-card > *,
.ex1202-fc-list > *,
.ex1202-fc-card > *,
.ex1202-related > *,
.ex1202-inspector-row > *,
.ex1202-sprite-callout > * {
  min-width: 0;
  max-width: 100%;
}

.ex1202-page img,
.ex1202-page svg {
  max-width: 100%;
  height: auto;
}

.ex1202-header {
  background: linear-gradient(135deg, #2a2618f2, #1b1b15fc);
  border: 2px solid #9f8a40;
  border-bottom: 4px solid #ffdc24;
  border-radius: 14px;
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 0 #0a0a07;
}

.ex1202-header h1 {
  margin: 0.45rem 0 0.75rem;
  font-size: clamp(1.65rem, 3.2vw, 2.45rem);
  line-height: 1.15;
  color: #ffe348;
  text-shadow: 2px 2px 0 #15140c;
}

.ex1202-lead {
  font-size: 1.04rem;
  line-height: 1.62;
  color: #f3edd9;
  margin: 0 0 1rem;
  max-width: 76ch;
}

.ex1202-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.ex1202-facts span {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  background: #232015;
  border: 1px solid #b59a3e;
  color: #fae69a;
  font-size: 0.84rem;
  font-weight: 700;
}

.ex1202-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin: 0.75rem 0 0.9rem;
}

.ex1202-actions .button {
  min-height: 44px;
}

.ex1202-byline {
  margin: 0;
  font-size: 0.88rem;
  color: #cfc5a0;
}

/* Hero figure */
.ex1202-hero-figure {
  margin: 0 0 1.6rem;
  background: #222119;
  border: 2px solid #8d7b3c;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 3px 4px 0 #080906;
}

.ex1202-hero-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.ex1202-hero-figure figcaption {
  padding: 0.7rem 1rem;
  font-size: 0.86rem;
  color: #d6cda9;
  border-top: 1px solid #6b5e32;
  background: #1c1b14;
}

/* Interactive Tool Shell */
.ex1202-tool {
  background: linear-gradient(145deg, #2d291cf5, #1d1e18fc);
  border: 2px solid #b89e43;
  border-radius: 14px;
  padding: clamp(1.1rem, 2.6vw, 1.75rem);
  margin: 0 0 1.75rem;
  box-shadow: inset 0 0 0 3px #171712, 4px 5px 0 #090906;
  scroll-margin-top: 5.5rem;
}

.ex1202-tool-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #6c6035;
}

.ex1202-tool-title {
  margin: 0.2rem 0 0;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  color: #ffe34d;
  font-weight: 800;
}

.ex1202-progress-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ex1202-stat-box {
  background: #1a1a14;
  border: 1px solid #7f703a;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
}

.ex1202-stat-label {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #c8be99;
  margin-bottom: 0.25rem;
}

.ex1202-stat-value {
  display: block;
  font-size: 1.08rem;
  font-weight: 800;
  color: #ffdf48;
}

.ex1202-progress-bar {
  width: 100%;
  height: 12px;
  accent-color: #ffdc24;
  margin: 0.35rem 0 1rem;
}

.ex1202-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.ex1202-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: #ebe0bc;
  min-width: 0;
  max-width: 100%;
}

.ex1202-controls input,
.ex1202-controls select,
.ex1202-inspector-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1.5px solid #9e8d4d;
  background-color: #171711;
  color: #fff3c4;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.ex1202-page select,
.ex1202-controls select,
.ex1202-add-form select {
  background-color: #171711;
  color: #fff3c4;
  color-scheme: dark;
  text-overflow: ellipsis;
}

.ex1202-page select option,
.ex1202-page select optgroup,
.ex1202-controls select option,
.ex1202-add-form select option {
  background-color: #171711 !important;
  color: #fff3c4 !important;
}

.ex1202-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
}

.ex1202-pill {
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #8e7c3e;
  background: #232118;
  color: #e9deb4;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
}

.ex1202-pill[aria-pressed="true"],
.ex1202-pill:hover {
  background: #ffdc24;
  color: #181814;
  border-color: #fff2a8;
}

.ex1202-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid #6b5f35;
}

.ex1202-toolbar .button {
  min-height: 44px;
}

.ex1202-status-msg {
  min-height: 1.35rem;
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  color: #ffe785;
}

/* Gym Cards */
.ex1202-gym-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 1rem;
}

.ex1202-gym-card {
  background: #1d1d16;
  border: 1.5px solid #8a793d;
  border-radius: 12px;
  padding: 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: border-color 0.15s ease;
}

.ex1202-gym-card[data-cleared="true"] {
  border-color: #8cc25a;
  background: linear-gradient(160deg, #1f2819, #181a14);
}

.ex1202-gym-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.ex1202-gym-num {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  background: #ffdc24;
  color: #181814;
  font-size: 0.78rem;
  font-weight: 800;
  margin-right: 0.4rem;
}

.ex1202-gym-name {
  margin: 0;
  font-size: 1.12rem;
  color: #ffe45c;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ex1202-gym-cap {
  flex-shrink: 0;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  background: #352b16;
  border: 1px solid #c9a73b;
  color: #ffe98a;
  font-size: 0.84rem;
  font-weight: 800;
}

.ex1202-gym-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  font-size: 0.86rem;
  color: #d6ceb0;
}

.ex1202-gym-meta strong {
  color: #f6ecc6;
}

.ex1202-sprites {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ex1202-mon {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.5rem 0.24rem 0.3rem;
  border-radius: 8px;
  background: #28271e;
  border: 1px solid #6f6235;
  font-size: 0.81rem;
  color: #f3ecd4;
}

.ex1202-mon img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  flex: 0 0 32px;
}

.ex1202-mon small {
  color: #c5bc97;
  font-size: 0.74rem;
}

.ex1202-gym-notes {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #d9d2b8;
}

.ex1202-check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  margin-top: auto;
  padding-top: 0.4rem;
  border-top: 1px solid #494228;
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffe680;
  cursor: pointer;
}

.ex1202-check-label input {
  width: 20px;
  height: 20px;
  accent-color: #ffdc24;
}

/* Friend Code Character Inspector */
.ex1202-inspector-box {
  background: #181812;
  border: 1.5px solid #9e8a43;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.15rem;
}

.ex1202-inspector-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: stretch;
  margin-top: 0.45rem;
}

.ex1202-inspector-input {
  flex: 1 1 280px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  font-size: 1rem;
}

.ex1202-glyph-stream {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.35rem;
  margin-top: 0.9rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: #12120e;
  border: 1px solid #595031;
}

.ex1202-glyph {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 34px;
  padding: 0.32rem 0.35rem;
  border-radius: 7px;
  background: #24231b;
  border: 1px solid #635834;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ex1202-glyph b {
  font-size: 1.08rem;
  line-height: 1.1;
  color: #fff6d1;
}

.ex1202-glyph small {
  font-size: 0.64rem;
  font-family: system-ui, -apple-system, sans-serif;
  color: #bcb38e;
  margin-top: 0.15rem;
}

.ex1202-glyph--warn {
  background: #47281a;
  border-color: #f07b54;
}

.ex1202-glyph--warn b {
  color: #ffd5c2;
}

.ex1202-glyph--warn small {
  color: #ffab8c;
  font-weight: 800;
}

.ex1202-glyph--num {
  background: #1b2f3d;
  border-color: #6ab5e8;
}

.ex1202-glyph--num small {
  color: #9ad4ff;
  font-weight: 800;
}

.ex1202-glyph--sep {
  min-width: 20px;
  background: transparent;
  border-color: transparent;
}

.ex1202-glyph--sep b {
  color: #ffdc24;
}

.ex1202-inspector-summary {
  margin: 0.65rem 0 0;
  font-size: 0.87rem;
  color: #e6ddbc;
}

/* Friend Code Notebook */
.ex1202-add-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
  gap: 0.65rem;
  background: #1b1b15;
  border: 1px solid #756738;
  border-radius: 10px;
  padding: 0.9rem;
  margin-bottom: 1rem;
}

.ex1202-add-form label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #e9deb8;
  min-width: 0;
  max-width: 100%;
}

.ex1202-add-form input,
.ex1202-add-form select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0.45rem 0.65rem;
  border-radius: 7px;
  border: 1px solid #8f7e44;
  background-color: #171711;
  color: #fff3c4;
  font-size: 0.9rem;
}

.ex1202-fc-list {
  display: grid;
  gap: 0.75rem;
}

.ex1202-fc-card {
  background: #1b1b15;
  border: 1.5px solid #84733b;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem 1rem;
}

.ex1202-fc-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffdf4d;
  word-break: break-all;
}

.ex1202-fc-meta {
  font-size: 0.85rem;
  color: #d6ceb0;
}

.ex1202-fc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.ex1202-mini-btn {
  min-height: 36px;
  padding: 0.3rem 0.65rem;
  border-radius: 7px;
  border: 1px solid #968341;
  background: #28261c;
  color: #ffe88a;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.ex1202-mini-btn:hover {
  background: #3d3722;
}

/* Tables, Prose, Diagrams, FAQ */
.ex1202-section {
  background: #212019ee;
  border: 1px solid #7e6f3a88;
  border-radius: 12px;
  padding: clamp(1.1rem, 2.5vw, 1.65rem);
  margin-bottom: 1.35rem;
  scroll-margin-top: 5.5rem;
}

.ex1202-section h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  color: #ffe24b;
}

.ex1202-section h3 {
  margin: 1.15rem 0 0.5rem;
  font-size: 1.06rem;
  color: #ffeb85;
}

.ex1202-section p,
.ex1202-section li {
  color: #e2dcc6;
  line-height: 1.65;
}

.ex1202-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.85rem 0;
  border: 1px solid #726434;
  border-radius: 10px;
}

.ex1202-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 560px;
}

.ex1202-table th,
.ex1202-table td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid #4e4527;
  text-align: left;
  vertical-align: top;
}

.ex1202-table thead th {
  background: #2c281b;
  color: #ffe35c;
  font-weight: 800;
}

.ex1202-table tbody tr:hover {
  background: #28261c;
}

.ex1202-diagram {
  margin: 1.1rem 0;
  background: #181812;
  border: 1.5px solid #8a783d;
  border-radius: 10px;
  overflow: hidden;
}

.ex1202-diagram img {
  display: block;
  width: 100%;
  height: auto;
}

.ex1202-diagram figcaption {
  padding: 0.6rem 0.9rem;
  font-size: 0.84rem;
  color: #cfc6a4;
  border-top: 1px solid #594e2c;
}

.ex1202-sprite-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  margin: 0.9rem 0;
  border-radius: 10px;
  background: #191913;
  border: 1px solid #7f6f3b;
}

.ex1202-sprite-callout img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  background: #26251c;
  border-radius: 8px;
  border: 1px solid #766736;
}

.ex1202-faq details {
  border: 1px solid #7c6d3980;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.65rem;
  background: #1b1b15;
}

.ex1202-faq summary {
  font-weight: 700;
  color: #fae89e;
  cursor: pointer;
}

.ex1202-faq details p {
  margin: 0.65rem 0 0;
}

.ex1202-related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.ex1202-related a {
  display: block;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: #1c1c15;
  border: 1px solid #8a793d;
  color: #ffe36b;
  font-weight: 700;
  text-decoration: none;
}

.ex1202-related a:hover {
  border-color: #ffdc24;
  background: #2b281c;
}

.ex1202-dialog {
  background: #23221a;
  color: #f5efdc;
  border: 2px solid #ffdc24;
  border-radius: 12px;
  padding: 1.25rem;
  max-width: 420px;
}

.ex1202-dialog::backdrop {
  background: rgba(10, 10, 8, 0.72);
}

.ex1202-dialog-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.ex1202-actions .button,
.ex1202-toolbar .button {
  max-width: 100%;
  white-space: normal;
}

.ex1202-facts span,
.ex1202-pill,
.ex1202-mon {
  max-width: 100%;
}

@media (max-width: 640px) {
  .ex1202-page {
    padding: 1rem 0 2.75rem;
  }
  .ex1202-gym-head {
    flex-direction: column;
  }
  .ex1202-table {
    font-size: 0.84rem;
  }
  .ex1202-inspector-input {
    flex: 1 1 100%;
  }
}

@media (max-width: 360px) {
  .ex1202-page {
    padding: 0.75rem 0 2.5rem;
  }
  .ex1202-header,
  .ex1202-tool,
  .ex1202-section {
    padding: 0.85rem;
  }
  .ex1202-gym-card,
  .ex1202-fc-card,
  .ex1202-inspector-box,
  .ex1202-add-form {
    padding: 0.75rem;
  }
  .ex1202-progress-strip,
  .ex1202-controls,
  .ex1202-add-form,
  .ex1202-gym-grid,
  .ex1202-related {
    grid-template-columns: minmax(0, 1fr);
  }
  .ex1202-actions .button,
  .ex1202-toolbar .button {
    width: 100%;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
  }
  .ex1202-facts span {
    font-size: 0.78rem;
    padding: 0.28rem 0.6rem;
  }
  .ex1202-mon {
    font-size: 0.76rem;
    padding: 0.2rem 0.42rem 0.2rem 0.26rem;
  }
}
