:root {
  --bg: #efeae0;
  --paper: #fbf8f1;
  --ink: #17181b;
  --pencil: rgba(23, 24, 27, 0.22);
  --soft: #7d7a72;
  --line: rgba(23, 24, 27, 0.1);
  --accent: #c8402f;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 12px 16px;
}

.fl {
  width: min(352px, 100%);
  padding: 15px 14px 12px;
  border-radius: 24px;
  background: var(--paper);
  box-shadow:
    0 0 0 1px rgba(23, 24, 27, 0.06),
    0 1px 2px rgba(23, 24, 27, 0.06),
    0 34px 60px -32px rgba(23, 24, 27, 0.32);
}
.fl__head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 3px 10px; }
.fl__title { font-size: 15px; font-weight: 660; font-stretch: 106%; letter-spacing: -0.008em; }
.fl__title i { margin-left: 7px; font-style: normal; font-size: 12px; font-weight: 480; color: var(--soft); }
.fl__left { font-size: 12px; font-weight: 480; color: var(--soft); }
.fl__left b { display: inline-block; font-weight: 680; color: var(--ink); }

.fl__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tat { position: relative; display: grid; place-items: center; height: min(88px, 20vh); padding: 0; border: 0; border-radius: 14px; background: rgba(23, 24, 27, 0.035); box-shadow: inset 0 0 0 1px rgba(23, 24, 27, 0.05); color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color 0.3s ease, box-shadow 0.3s ease; overflow: hidden; }
.tat.is-on { background: #ffffff; box-shadow: inset 0 0 0 1.5px var(--ink); }
.tat:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tat svg { width: min(58px, 13vh); height: min(58px, 13vh); overflow: visible; }
.tat path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tat__pencil { stroke: var(--pencil); stroke-width: 1.6; }
.tat__ink { stroke: var(--ink); stroke-width: 2.2; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.tat.is-mine .tat__ink { stroke: var(--accent); }
.tat__tag { position: absolute; left: 6px; top: 6px; height: 17px; padding: 0 6px; border-radius: 99px; font-size: 10px; line-height: 17px; font-weight: 680; letter-spacing: 0.02em; opacity: 0; }
.tat.is-taken .tat__tag { opacity: 1; background: rgba(23, 24, 27, 0.08); color: var(--soft); }
.tat.is-mine .tat__tag { opacity: 1; background: var(--accent); color: #ffffff; }
.tat.is-taken svg { opacity: 0.55; }

.fl__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; padding: 0 3px; }
.fl__what { min-width: 0; display: grid; gap: 1px; }
.fl__name { height: 21px; overflow: hidden; font-size: 16px; line-height: 21px; font-weight: 670; font-stretch: 104%; letter-spacing: -0.012em; }
.fl__info { height: 16px; overflow: hidden; font-size: 12px; line-height: 16px; font-weight: 480; color: var(--soft); }
.fl__what span span { display: block; white-space: nowrap; }
.fl__go { flex: none; height: 40px; padding: 0 17px; border: 0; border-radius: 99px; background: var(--ink); color: #ffffff; font: inherit; font-size: 13.5px; font-weight: 620; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color 0.35s ease, color 0.35s ease; }
.fl__go-text { display: block; height: 19px; overflow: hidden; line-height: 19px; }
.fl__go-text span { display: block; white-space: nowrap; }
.fl__go:disabled { background: rgba(23, 24, 27, 0.08); color: var(--soft); cursor: default; }
.fl__go.is-mine { background: var(--accent); color: #ffffff; }
.fl__go:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #ffffff;
  stroke: #14151a;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

@media (min-width: 700px) and (min-height: 500px) {
  .fl { zoom: 1.3; }
}
@media (min-width: 1100px) and (min-height: 760px) {
  .fl { zoom: 1.6; }
}
