/* app:src/styles.css */
:root {
  --paper: #f3ede2;
  --ink: #171512;
  --muted: #6b645a;
  --accent: #e5432f;
  --gold: #f5b700;
  --ok: #1d7a46;
  --card: #fff;
  font-family:
    "Bricolage Grotesque",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  background-image: radial-gradient(rgba(23, 21, 18, 0.07) 1px, transparent 1px);
  background-size: 18px 18px;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}
.logo {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.04em;
  text-decoration: none;
}
.logo span {
  color: var(--accent);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang {
  min-width: 44px;
  min-height: 36px;
  padding: 0 0.6em;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.lang:hover {
  background: #fff;
}
.lang:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 48px;
}
.lead {
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 36em;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  min-height: 44px;
  padding: 0.6em 1.2em;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}
.btn:focus-visible,
.seg button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: 3px 3px 0 var(--ink);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-ghost:hover,
.btn-ghost:active {
  box-shadow: none;
  transform: none;
}
.btn-small {
  min-height: 36px;
  padding: 0.35em 0.9em;
  font-size: 0.92rem;
  box-shadow: 2px 2px 0 var(--ink);
}
.btn-big {
  font-size: 1.1rem;
  padding: 0.75em 1.4em;
}
.card {
  container-type: inline-size;
  width: 100%;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 6px;
  padding: 4.5% 4.5% 5%;
  box-shadow: 8px 8px 0 var(--ink);
}
.card-small {
  border-width: 2px;
  box-shadow: 5px 5px 0 var(--ink);
}
.card-title {
  text-align: center;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 3.5cqi;
  overflow-wrap: break-word;
}
.grid {
  display: grid;
  border-top: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
}
.card-small .grid,
.card-small .cell {
  border-width: 1.5px;
}
.cell {
  container-type: inline-size;
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  min-width: 0;
  padding: 7%;
  margin: 0;
  border: 0;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  line-height: 1.12;
  text-align: center;
  hyphens: auto;
  overflow-wrap: break-word;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button.cell {
  cursor: pointer;
  transition: background 0.12s;
}
button.cell:hover {
  background: #fbf5e8;
}
button.cell:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -4px;
  z-index: 3;
}
.cell-text {
  position: relative;
  z-index: 1;
}
.star {
  color: var(--gold);
  font-size: 1.6em;
  line-height: 1;
}
.is-free {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.is-empty {
  color: var(--muted);
  background:
    repeating-linear-gradient(
      45deg,
      #fbf8f2,
      #fbf8f2 6px,
      #f2ece1 6px,
      #f2ece1 12px);
}
.dab {
  position: absolute;
  inset: 8%;
  z-index: 2;
  border-radius: 48% 52% 50% 47% / 50% 46% 54% 50%;
  background:
    radial-gradient(
      circle at 38% 34%,
      rgba(229, 67, 47, 0.42),
      rgba(229, 67, 47, 0.62) 55%,
      rgba(190, 38, 26, 0.72));
  mix-blend-mode: multiply;
  pointer-events: none;
  transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
  animation: dab 0.24s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.is-free .dab {
  background:
    radial-gradient(
      circle at 38% 34%,
      rgba(245, 183, 0, 0.35),
      rgba(245, 183, 0, 0.55));
  animation: none;
}
.is-win {
  background: #fff3c4;
}
button.cell.is-win:hover {
  background: #ffeeb0;
}
@keyframes dab {
  from {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.3);
  }
}
.card-wrap {
  position: relative;
}
.stamp {
  position: absolute;
  top: -24px;
  right: -8px;
  z-index: 5;
  padding: 0.05em 0.35em;
  border: 4px solid var(--accent);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent);
  font-weight: 800;
  font-size: clamp(26px, 7vw, 52px);
  letter-spacing: 0.01em;
  transform: rotate(8deg);
  box-shadow: 4px 4px 0 var(--ink);
  animation: stamp 0.38s cubic-bezier(0.2, 1.7, 0.4, 1);
  pointer-events: none;
}
@keyframes stamp {
  from {
    opacity: 0;
    transform: rotate(8deg) scale(2.4);
  }
}
.confetti {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  pointer-events: none;
}
.confetti i {
  position: absolute;
  top: -24px;
  border-radius: 2px;
  animation: fall var(--d) var(--delay) cubic-bezier(0.3, 0.5, 0.6, 1) forwards;
}
@keyframes fall {
  to {
    transform: translate(var(--x), 110vh) rotate(var(--r));
  }
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 32px 0 24px;
}
.hero h1 {
  font-size: clamp(46px, 8vw, 92px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 0 0 24px;
}
.hero h1 em {
  font-style: normal;
  padding: 0 0.06em;
  margin: 0 -0.06em;
  background:
    linear-gradient(
      176deg,
      transparent 50%,
      var(--gold) 50%,
      var(--gold) 84%,
      transparent 84%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hero .row {
  margin-top: 28px;
}
.hero-card {
  display: block;
  text-decoration: none;
  transform: rotate(2.5deg);
  transition: transform 0.2s;
  max-width: 480px;
  justify-self: center;
  width: 100%;
}
.hero-card:hover {
  transform: rotate(0.5deg) scale(1.01);
}
.section {
  margin-top: 64px;
}
.section > h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 24px;
}
.examples {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 36px 28px;
}
.example h3 {
  font-size: 1.4rem;
  margin: 22px 0 6px;
}
.example p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.45;
}
.example-card {
  display: block;
  text-decoration: none;
  transition: transform 0.15s;
}
.example:nth-child(odd) .example-card {
  transform: rotate(-1.2deg);
}
.example:nth-child(even) .example-card {
  transform: rotate(1.2deg);
}
.example .example-card:hover {
  transform: rotate(0) translateY(-3px);
}
.mine {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.mine li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 16px;
}
.mine li + li {
  border-top: 1.5px dashed rgba(23, 21, 18, 0.25);
}
.mine-title {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  min-width: 0;
  overflow-wrap: anywhere;
}
.mine-title:hover {
  text-decoration: underline;
}
.mine-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.how ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.how li {
  counter-increment: step;
  position: relative;
  padding: 56px 20px 20px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 14px;
  line-height: 1.5;
}
.how li::before {
  content: counter(step);
  position: absolute;
  top: 14px;
  left: 18px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}
.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.editor h1 {
  font-size: clamp(36px, 6vw, 56px);
  margin: 12px 0 8px;
}
.field {
  display: block;
  margin: 22px 0 0;
}
.field > span {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}
.field small {
  font-weight: 500;
  color: var(--muted);
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.7em 0.85em;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.field textarea {
  min-height: 280px;
  line-height: 1.55;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
}
.seg {
  display: inline-flex;
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.seg button {
  min-height: 44px;
  padding: 0.5em 1.1em;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.seg button + button {
  border-left: 2px solid var(--ink);
}
.seg button[aria-pressed=true] {
  background: var(--ink);
  color: #fff;
}
.count {
  margin: 10px 0 0;
  font-weight: 700;
}
.count.ok {
  color: var(--ok);
}
.count.bad {
  color: var(--accent);
}
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 18px 0 0;
  cursor: pointer;
}
.check input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--accent);
}
.check small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.4;
}
.check.is-disabled {
  opacity: 0.55;
  cursor: default;
}
.editor-form .row {
  margin-top: 28px;
}
.preview {
  position: sticky;
  top: 16px;
}
.preview-label {
  margin: 18px 0 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}
.play {
  max-width: 660px;
  padding-top: 20px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}
.note {
  margin: 18px auto 0;
  max-width: 34em;
  text-align: center;
  color: var(--muted);
  line-height: 1.5;
}
.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(23, 21, 18, 0.45);
}
.dialog {
  width: 100%;
  max-width: 540px;
  padding: 24px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 8px 8px 0 var(--ink);
}
.dialog h2 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}
.dialog p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}
.share-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.share-row input {
  flex: 1;
  min-width: 0;
  padding: 0.6em 0.8em;
  border: 2px solid var(--ink);
  border-radius: 12px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--muted);
}
.bad {
  padding-top: 48px;
}
.bad h1 {
  font-size: clamp(36px, 6vw, 56px);
  margin: 0 0 12px;
}
.foot {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  color: var(--muted);
  font-size: 0.95rem;
}
@media (max-width: 860px) {
  .hero,
  .editor {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    gap: 40px;
    padding-top: 12px;
  }
  .hero-card {
    max-width: 420px;
    transform: rotate(1.5deg);
  }
  .preview {
    position: static;
  }
}
@media (max-width: 520px) {
  .card {
    box-shadow: 5px 5px 0 var(--ink);
  }
  .share-row {
    flex-direction: column;
  }
  .actions .btn {
    flex: 1 1 calc(50% - 12px);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .confetti {
    display: none;
  }
}
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .play {
    max-width: none;
    padding: 0;
  }
  .card {
    box-shadow: none;
  }
  .stamp {
    display: none;
  }
  .dab {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
/*# sourceMappingURL=main.css.map */
