/* Polyfetti - the GLOBAL SIDE look (owner, 2026-10-12: "a different identity from the Japanese home page").
 *
 * One layer over the shared tokens: every colour the reading-zone pages draw is remapped here from the --g-* values below, so the global
 * pages can change their whole palette by editing this block and nothing else. The Japan pages never load this file.
 *
 * The palette is Dusk violet, picked by the owner on the global look board, 2026-10-12. Every pair holds the site's
 * AAA bar (ink 13.6:1 on the page, muted 8.2:1, small accent text 11.0:1, white on the accent 10.4:1).
 */

body.global-theme {
  --g-shell:  #E8E4F1;   /* the page ground                       */
  --g-card:   #FCFBFE;   /* a card                                */
  --g-ink:    #1D1A2B;
  --g-muted:  #433D5C;
  --g-line:   #CBC4DF;   /* rules and borders only                */
  --g-accent: #46337A;
  --g-deep:   #32235C;   /* small accent text on the ground       */
  --g-bright: #6048A8;   /* fills and hover only, never small text */
  --g-wash:   #EEEAF8;
  --g-edge:   #CBC2E3;
  --g-banner: #D9D1EC;

  /* the reading zone's own names */
  --zone-read-shell: var(--g-shell);
  --warm: var(--g-card);
  --zone-read: var(--g-ink);
  --read-muted: var(--g-muted);
  --read-line: var(--g-line);
  --read-accent: var(--g-accent);
  --read-accent-deep: var(--g-deep);

  /* the site's accent names, so buttons, links and the logo mark follow */
  --accent: var(--g-accent);
  --accent-deep: var(--g-deep);
  --accent-bright: var(--g-bright);
  --accent-lift: var(--g-bright);
  --accent-wash: var(--g-wash);
  --accent-edge: var(--g-edge);
  --field-edge: var(--g-accent);
  --paper: var(--g-shell);        /* the home pages' ground */
  --paper-sunk: var(--g-shell);
  --muted: var(--g-muted);
  --ink: var(--g-ink);
  --pf-edge: linear-gradient(120deg, var(--g-bright), var(--g-edge), var(--g-accent), var(--g-edge));
}

/* The back link and its focus ring are written in the Japan accent in back.css; here they follow the global one. */
body.global-theme .backrow a { color: var(--g-accent); }
body.global-theme .backrow a:focus-visible { outline-color: var(--g-accent); }

/* The Coming soon box was the Japan pages' yellow opening-rate box; here it is the accent's own tint. */
body.global-theme .opening {
  background: var(--g-banner);
  color: var(--g-ink);
  border-color: var(--g-accent);
}

/* The translation seal: a notary-style round stamp (two arrows, between languages) that stands where the Japan pages draw the 証 seal. */
body.global-theme .global-seal {
  position: absolute;
  right: max(32px, calc((100vw - 1176px) / 2 + 32px));
  top: 70px;
  width: 168px;
  height: 168px;
  color: var(--g-accent);
  transform: rotate(-9deg);
  opacity: .92;
  z-index: 1;
}
@media (max-width: 860px) {
  body.global-theme .global-seal { width: 84px; height: 84px; right: 16px; top: 18px; }
}

/* The thank-you banner is drawn in the Japan blue (--pf-blue); on the global side it is the accent. */
body.global-theme .pf-banner { --pf-blue: var(--g-accent); background: var(--g-accent); }

/* ---- the global home and counters (owner, 2026-10-13) ------------------------------------------------------------------------ */

/* The Coming soon note in the hero and on the counters: the accent's own tint, never the Japan yellow. */
body.global-theme .gh-soon {
  margin: 14px 0 0;
  padding: 10px 14px;
  max-width: 34rem;
  background: var(--g-banner);
  color: var(--g-ink);
  border: 1px solid var(--g-accent);
  border-radius: 12px;
  font-size: .95rem;
  line-height: 1.5;
}
body.global-theme .gh-soon b { margin-right: .4rem; color: var(--g-deep); letter-spacing: .04em; text-transform: uppercase; font-size: .78rem; }

/* Pair first (lanes B): the language chips sit above the three counters. */
body.global-theme .gpick { display: grid; gap: 14px; margin: 0 0 22px; }
body.global-theme .gp-group h3 { margin: 0 0 8px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--g-muted); }
body.global-theme .gp-row { display: flex; flex-wrap: wrap; gap: 8px; }
body.global-theme .gp-chip, body.global-theme .gp-more {
  font: inherit; font-size: .95rem; line-height: 1.2; padding: 9px 14px; border-radius: 999px;
  background: var(--g-card); color: var(--g-ink); border: 1px solid var(--g-line); cursor: pointer; text-decoration: none;
}
body.global-theme .gp-chip:hover { border-color: var(--g-accent); }
body.global-theme .gp-chip[aria-pressed="true"] { background: var(--g-accent); color: #fff; border-color: var(--g-accent); }
body.global-theme .gp-more { background: transparent; color: var(--g-deep); border-style: dashed; }
body.global-theme .gp-chip:focus-visible, body.global-theme .gp-more:focus-visible { outline: 3px solid var(--g-bright); outline-offset: 2px; }

body.global-theme .lp-prices { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 0; max-width: 34rem; }
body.global-theme .lp-prices li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--g-line); }
body.global-theme .lp-prices li span { flex: 1 1 12rem; }
body.global-theme .lp-prices li b { font-size: 1.15rem; color: var(--g-deep); font-variant-numeric: tabular-nums; }
body.global-theme .lp-prices li small { flex-basis: 100%; color: var(--g-muted); }

body.global-theme .foot-soon { display: block; color: #E4DEF3; }
body.global-theme .foot-soon small { margin-left: .4rem; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }

/* The counters page. */
body.global-counter .gc-wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
body.global-counter .gc-hero { padding-block: 40px 20px; }
body.global-counter .gc-hero h1 { margin: 4px 0 8px; text-wrap: balance; }
body.global-counter .gc-hero h1 em { font-style: normal; color: var(--g-accent); }
body.global-counter .gc-sub { margin: 0; max-width: 40rem; color: var(--g-muted); font-size: 1.1rem; }
body.global-counter main.gc-wrap { display: grid; gap: 22px; padding-block: 12px 56px; }
body.global-counter .gc-pair { background: var(--g-card); border: 1px solid var(--g-line); border-radius: 16px; padding: 18px 20px; display: grid; gap: 10px; }
body.global-counter .gc-pair h2, body.global-counter .gc-panel h2 { margin: 0; font-size: 1.25rem; }
body.global-counter select, body.global-counter input[type="number"], body.global-counter textarea {
  font: inherit; font-size: 1.05rem; color: var(--g-ink); background: #fff; border: 2px solid var(--g-line); border-radius: 12px; padding: 10px 12px; width: 100%; box-sizing: border-box;
}
body.global-counter select:focus-visible, body.global-counter input:focus-visible, body.global-counter textarea:focus-visible { outline: 3px solid var(--g-bright); outline-offset: 2px; border-color: var(--g-accent); }
body.global-counter .gc-pair select { max-width: 26rem; }
body.global-counter .gc-note { margin: 0; color: var(--g-muted); }

body.global-counter .gc-desks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: -22px; position: relative; z-index: 1; }
body.global-counter .gc-desk {
  font: inherit; text-align: left; display: grid; gap: 2px; padding: 14px 16px 18px; background: var(--g-wash); color: var(--g-ink);
  border: 1px solid var(--g-line); border-bottom: 0; border-radius: 16px 16px 0 0; cursor: pointer; border-top: 6px solid var(--g-edge);
}
body.global-counter .gc-desk b { font-size: 1.15rem; }
body.global-counter .gc-desk span { color: var(--g-muted); font-size: .92rem; }
body.global-counter .gc-desk[aria-selected="true"] { background: var(--g-card); border-top-color: var(--g-accent); }
body.global-counter .gc-desk:focus-visible { outline: 3px solid var(--g-bright); outline-offset: -3px; }

body.global-counter .gc-panels { background: var(--g-card); border: 1px solid var(--g-line); border-radius: 0 0 16px 16px; padding: 26px 22px 24px; }
body.global-counter .gc-panel { display: grid; gap: 14px; }
body.global-counter .gc-panel[hidden] { display: none; }
body.global-counter .gc-panel h3 { margin: 0; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--g-muted); }
body.global-counter .gc-lede { margin: 0; max-width: 42rem; }
body.global-counter .gc-fine { margin: 0; max-width: 42rem; color: var(--g-muted); font-size: .95rem; }
body.global-counter .gc-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
body.global-counter .gc-chips li { padding: 8px 14px; border-radius: 999px; background: var(--g-wash); border: 1px solid var(--g-edge); }
body.global-counter .gc-calc { display: grid; grid-template-columns: auto 6rem 1fr; gap: 12px; align-items: center; padding: 14px 16px; background: var(--g-wash); border-radius: 14px; }
body.global-counter .gc-total { display: grid; gap: 2px; }
body.global-counter .gc-total b { font-size: 1.6rem; color: var(--g-deep); font-variant-numeric: tabular-nums; }
body.global-counter .gc-total span { color: var(--g-muted); }
body.global-counter .gc-count { color: var(--g-muted); }
body.global-counter .gc-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 12px; }
body.global-counter .gc-tier { display: grid; gap: 4px; padding: 16px; background: var(--g-wash); border: 1px solid var(--g-edge); border-radius: 14px; }
body.global-counter .gc-tier b { font-size: 1.1rem; }
body.global-counter .gc-tier small { color: var(--g-muted); }
body.global-counter .gc-tier strong { font-size: 1.5rem; color: var(--g-deep); font-variant-numeric: tabular-nums; }
body.global-counter .gc-tier span { color: var(--g-muted); }
body.global-counter .gc-products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 10px; }
body.global-counter .gc-products button {
  font: inherit; width: 100%; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; text-align: left;
  padding: 12px 14px; border-radius: 12px; background: var(--g-wash); color: var(--g-ink); border: 2px solid var(--g-edge); cursor: pointer;
}
body.global-counter .gc-products button b { color: var(--g-deep); font-variant-numeric: tabular-nums; }
body.global-counter .gc-products button[aria-pressed="true"] { background: var(--g-accent); color: #fff; border-color: var(--g-accent); }
body.global-counter .gc-products button[aria-pressed="true"] b { color: #fff; }
body.global-counter .gc-products button:focus-visible { outline: 3px solid var(--g-bright); outline-offset: 2px; }
body.global-counter .gc-picked { padding: 14px 16px; background: var(--g-wash); border-radius: 14px; }
body.global-counter .gc-foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
body.global-counter .gc-foot .button[disabled] { opacity: .6; cursor: not-allowed; }
body.global-counter .gc-status:empty { display: none; }
@media (max-width: 680px) {
  body.global-counter .gc-desks { grid-template-columns: 1fr; margin-bottom: 0; }
  body.global-counter .gc-desk { border-radius: 12px; border-bottom: 1px solid var(--g-line); }
  body.global-counter .gc-panels { border-radius: 16px; margin-top: 8px; }
  body.global-counter .gc-calc { grid-template-columns: 1fr; }
}

/* Extras and discounts lists (owner, 2026-10-13). */
body.global-counter .gc-extras, body.global-theme .price-col ul + .extras-h + ul { list-style: none; margin: 0; padding: 0; }
body.global-counter .gc-extras { display: grid; gap: 0; max-width: 40rem; }
body.global-counter .gc-extras li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--g-line); }
body.global-counter .gc-extras b { color: var(--g-deep); font-variant-numeric: tabular-nums; text-align: right; }
body.global-counter .gc-panel h3 small, body.global-theme .extras-h small { margin-left: .4rem; letter-spacing: .04em; font-size: .72rem; }
body.global-theme .extras-h { margin: 14px 0 6px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--g-muted); }

/* Long extras values (a share of the price, with a floor) wrap inside their column instead of pushing it wider. */
body.global-theme .price-cols { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
body.global-theme .price-col { min-width: 0; }
body.global-theme .price-col li b { text-align: right; overflow-wrap: anywhere; max-width: 55%; font-size: 1rem; }

body.global-theme .price-col li { min-width: 0; }
body.global-theme .price-col li b { min-width: 0; flex: 0 1 auto; white-space: normal; }

/* A counter that cannot be used for the chosen pair yet is greyed, with its reason beside it (owner, 2026-10-13). */
body.global-counter .gc-desk.is-soon { opacity: .7; }
body.global-counter .gc-desk.is-soon b::after { content: " · soon"; font-weight: 500; color: var(--g-muted); }
body.global-counter .gc-panel.is-soon .gc-calc, body.global-counter .gc-panel.is-soon .gc-chips { opacity: .55; }
body.global-counter .gc-status { padding: 10px 14px; border-radius: 12px; background: var(--g-banner); color: var(--g-ink); }

/* The languages as two centred dropdowns, and the lane menus as cards (owner, 2026-10-13). */
body.global-theme .lanes > h2 { text-align: center; }
body.global-theme .gp-pick { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 22px; margin: 10px auto 18px; }
body.global-theme .gp-sel { display: grid; gap: 6px; min-width: min(18rem, 100%); text-align: center; }
body.global-theme .gp-sel span { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--g-muted); }
body.global-theme .gp-sel select { font: inherit; font-size: 1.05rem; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--g-line); background: #fff; color: var(--g-deep); text-align: center; text-align-last: center; }
body.global-theme .gp-sel select:focus-visible { outline: 3px solid var(--g-accent); outline-offset: 2px; }
body.global-theme .lp-set { display: grid; gap: 8px; margin-top: 14px; }
body.global-theme .lp-set-h { margin: 6px 0 0; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--g-muted); }

/* On a phone the menu slides in from the left instead of standing above the page. The generated global-recolour.css repaints .sidebar under
   body.global-theme, which out-ranked style.css's own phone rule, so the sidebar stayed in the page flow and pushed the whole home page a screen
   down. Same rule, one step more specific. */
@media (max-width: 860px) {
  html body.global-theme .sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: 260px; z-index: 60; transform: translateX(-100%); transition: transform .25s ease; }
  html body.global-theme .sidebar[data-open] { transform: none; }
}

/* Phone: the price columns stack; three squeezed columns plus their gaps were wider than the screen. */
@media (max-width: 700px) { body.global-theme .price-cols { grid-template-columns: 1fr; } }

/* The way from the calculator into the real counter. */
body.global-counter .gc-start { margin: 14px 0 6px; }
body.global-counter .gc-start a { display: inline-block; padding: 12px 20px; border-radius: 999px; background: var(--g-accent); color: #fff; font-weight: 700; text-decoration: none; }
body.global-counter .gc-start a:focus-visible { outline: 3px solid var(--g-bright); outline-offset: 2px; }
