/* The Tile studio's base: colors, type, cards, buttons and fields, taken from Backstage's old stylesheet
   (mahjmentor-site/public/backstage/backstage.css, 2026-10-10) and cut to the rules the studio uses, so the studio
   no longer waits on that page's file. Fonts stay self-hosted in /fonts/. Edit here; studio.css loads after. */
@font-face {
  font-family: "Cormorant Garamond Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("/fonts/cormorant-garamond-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("/fonts/cormorant-garamond-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond Variable";
  font-style: italic;
  font-display: swap;
  font-weight: 300 700;
  src: url("/fonts/cormorant-garamond-latin-wght-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond Variable";
  font-style: italic;
  font-display: swap;
  font-weight: 300 700;
  src: url("/fonts/cormorant-garamond-latin-ext-wght-italic.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Jost Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/jost-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jost Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/jost-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Jost Variable";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/jost-latin-wght-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jost Variable";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/jost-latin-ext-wght-italic.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --canvas: #fbf7f0;
  --paper: #ffffff;
  --card: #ffffff;
  --inset: #f6f0e5;
  --jade: #a85566;
  --jade-deep: #7e3c4b;
  --jade-ink: #5e2c38;
  --jade-soft: #f7e3e5;
  --fern: #4f6b55;
  --sage-soft: #e4ece0;
  --mist: #e5ebfa;
  --hydrangea-deep: #4a5e9c;
  --clay-soft: #f8e1d8;
  --clay-ink: #8f4630;
  --gilt-ink: #86652f;
  --ink: #2e2a33;
  --ink-soft: #615a66;
  --ink-faint: #6b6470;
  --line: #e4d6bc;
  --line-soft: #efe6d3;
  --crak: #c0261f;
  --crak-soft: #fbe7e5;
  --dot: #1d5fa8;
  --dot-soft: #e5ebfa;
  --bam: #1f7a44;
  --bam-soft: #e4ece0;
  --gold: #c9a46a;
  --gold-soft: #f3e8d2;
  --plum: #7b68b5;
  --plum-soft: #ece6f7;
  --display: "Cormorant Garamond Variable", "Cormorant Garamond", Georgia, serif;
  --sans: "Jost Variable", "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(46, 42, 51, 0.04);
  color-scheme: light;
}
.main>section,.main>.grid{margin-bottom:18px}
.main>.page-head{margin-bottom:20px}.main h1{font-size:42px}.main h2{font-size:25px}
.needs{border-top:2px solid var(--jade)}.main label{display:block;font-size:13px;font-weight:600;margin:14px 0}.main input,.main textarea,.main select{display:block;width:100%;margin-top:7px;min-height:44px;font:400 15px/1.4 var(--sans);padding:10px 12px;border:1px solid #d9c9a8;border-radius:8px;background:#fff;color:var(--ink)}.main textarea{resize:vertical}.main input[type=checkbox]{min-height:22px;width:22px;height:22px;margin:0;accent-color:var(--jade);flex-shrink:0}.btn.primary:disabled{background:var(--jade);color:white;opacity:.65}.btn{min-height:44px}.btn:active{transform:scale(.98)}.block{display:block;color:var(--ink-soft);font-size:12px}.main form+form{border-top:1px solid var(--line);margin-top:22px;padding-top:8px}.main details{margin-top:22px;border-top:1px solid var(--line);padding-top:16px}.main summary{cursor:pointer;min-height:36px;color:var(--jade-deep);font-weight:600;font-size:13px}.main details p{font-size:13px}.note{padding:15px;background:var(--inset);border-radius:10px;margin-top:14px;font-size:13px}
.main>.hint{margin:0 0 18px}.main .hint+.btn,.main .hint+button{margin-top:12px}.main form+h3{margin-top:28px}
@media(max-width:719px){.shell{padding:0 18px!important}.main{padding:0 0 105px!important}.main h1,.main .page-head h1{font-size:36px}.main h2{font-size:24px}.page-head p{font-size:13px!important}.page-head{display:block!important}.card{padding:20px!important;border-radius:16px!important}.card-head{gap:12px;align-items:flex-start!important}.card-head>a{font-size:12px;white-space:nowrap}.grid.two{grid-template-columns:1fr!important}}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  min-height: 100vh;
}
a { color: var(--jade-deep); text-underline-offset: 3px; }
em, i, cite, dfn, var, address { font-style: normal; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid rgba(168, 85, 102, 0.6); outline-offset: 2px; border-radius: 6px; }
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: 600 12.5px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  min-height: 42px;
}
.btn:hover { border-color: #d9c9a8; }
.btn.primary { background: var(--jade); border-color: var(--jade); color: #fff; }
.btn.primary:hover { background: var(--jade-deep); }
.btn.primary[disabled] { background: var(--jade); opacity: 0.55; cursor: default; }
.btn.danger { color: var(--crak); }
.btn.quiet { background: transparent; }
.btn.wide { width: 100%; padding: 14px 16px; font-size: 15px; }
.btn.small { min-height: 34px; padding: 8px 12px; font-size: 13px; }
.icon-btn { appearance: none; border: 0; background: transparent; padding: 6px; border-radius: 10px; color: var(--ink-soft); cursor: pointer; }
.icon-btn:hover { background: var(--line-soft); }
.link { color: var(--jade-deep); font-weight: 600; text-decoration: none; }
.main { max-width: 1180px; margin: 0 auto; padding: 18px 16px 64px; outline: none; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); padding: 40px 0; justify-content: center; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--jade-soft); border-top-color: var(--jade); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 42px; line-height: 1.05; }
.page-head p { margin: 6px 0 0; color: var(--ink-soft); max-width: 640px; }
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid.two { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  min-width: 0;
}
.card h2 { font-size: 24px; margin: 0 0 4px; }
.card .sub { color: var(--ink-soft); font-size: 13px; margin: 0 0 14px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mix { margin-top: 20px; position: relative; z-index: 1; }
.ok { color: var(--bam); } .bad { color: var(--crak); }
input, select, textarea {
  font: 400 15px/1.4 var(--sans);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  width: 100%;
  min-height: 42px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--jade); box-shadow: 0 0 0 3px rgba(168, 85, 102, 0.15); }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }

.players { display: grid; gap: 10px; }
.player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 4px 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
@media (min-width: 760px) {
  .player { grid-template-columns: minmax(0, 1.4fr) 110px minmax(0, 2fr) auto; }
}

.req { display: grid; gap: 10px; }
.steps { display: flex; gap: 0; margin: 12px 0 4px; overflow-x: auto; scrollbar-width: none; }
.steps li { list-style: none; flex: 1 0 74px; text-align: center; position: relative; font-size: 12px; color: var(--ink-faint); padding-top: 22px; }
.steps li::before { content: ""; position: absolute; top: 6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--line); z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.steps li:first-child::after { display: none; }
.steps li.on { color: var(--jade-deep); font-weight: 600; }
.steps li.on::before { background: var(--jade); box-shadow: 0 0 0 3px var(--jade-soft); }
.steps li.on::after { background: var(--jade); }
.steps ol { display: contents; }
.sheet {
  border: 0;
  padding: 0;
  border-radius: 22px;
  width: min(560px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  box-shadow: 0 24px 60px rgba(46, 42, 51, 0.22);
  background: var(--paper);
  color: var(--ink);
}
.sheet::backdrop { background: rgba(46, 42, 51, 0.4); }
.sheet-body { padding: 18px 18px 20px; display: grid; gap: 14px; }
.group { border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin: 0; display: grid; gap: 10px; background: var(--card); }
.group legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.hint { margin: 0; font-size: 13px; color: var(--ink-soft); }
.quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.quick button { appearance: none; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 9px 0; font: 600 14px var(--sans); color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.quick button:hover { border-color: var(--jade); color: var(--jade-deep); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .spinner { transition: none; animation: none; } }
.boot { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--ink-soft); }
.boot[hidden] { display: none !important; }
.grid.top { align-content: start; align-items: start; }
.device { margin: 0; width: min(330px, 100%); }
.device .screen { position: relative; overflow: hidden; border-radius: 44px; background: #fbf7f0; }
.device.android .screen { border-radius: 32px; }
.device .status { position: relative; height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; font: 600 13px var(--sans); color: var(--ink); background: #fbf7f0; }
.device.android .status { padding: 0 22px; height: 30px; font-size: 12px; }
.device.ios .status::after { content: ""; position: absolute; top: 9px; left: 50%; width: 92px; height: 26px; margin-left: -46px; border-radius: 14px; background: #0b0c0e; }
.device.android .status::after { content: ""; position: absolute; top: 8px; left: 50%; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: #0b0c0e; }
.device figcaption { text-align: center; margin-top: 12px; font-weight: 600; color: var(--ink-soft); }
.questions { display: grid; gap: 14px; max-width: 860px; }
.q { display: grid; gap: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.count { font-size: 12.5px; font-weight: 600; color: var(--ink-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.count.over { color: var(--crak); }
@media (min-width: 760px) { .main .grid.two > form + form { border-top: 0; margin-top: 0; padding-top: 0; } }
