    body {
      margin: 0
    }

    img {
      max-width: 100%
    }

    [hidden] {
      display: none !important
    }

    /* Andis brand: Green Roast #4C5A3E + Ivory Cream #F0EADD, one deliberate light look */
    :root {
      --green: #4C5A3E;
      --green-deep: #3C4731;
      --cream: #F0EADD;
      --paper: #F8F5EE;
      --ink: #2F3826;
      --muted: #6E7862;
      --rule: rgba(76, 90, 62, .22);
      --warn: #9A5B2E;
    }

    html,
    body {
      height: 100%
    }

    body {
      background: var(--cream);
      color: var(--ink);
      font-family: "Alexandria", "Segoe UI", Tahoma, sans-serif;
      font-weight: 300;
      font-size: 15px;
      line-height: 1.65;
      direction: rtl;
      -webkit-tap-highlight-color: transparent;
    }

    .wrap {
      max-width: 460px;
      margin: 0 auto;
      padding-inline: 16px;
      padding-block: 16px 24px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      box-sizing: border-box
    }

    header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 10px;
      direction: ltr
    }

    .brand svg {
      width: 30px;
      height: 40px;
      flex: none
    }

    .wordmark {
      font-family: "Bodoni Moda", Didot, Georgia, serif;
      font-weight: 600;
      font-size: 22px;
      letter-spacing: .02em;
      line-height: 1;
      color: var(--green)
    }

    .wordmark small {
      display: block;
      font-family: "Montserrat Alternates", sans-serif;
      font-weight: 300;
      font-size: 8px;
      letter-spacing: .7em;
      margin-top: 5px
    }

    .count {
      font-size: 12px;
      color: var(--cream);
      background: var(--green);
      padding: 7px 11px;
      border-radius: 12px;
      text-align: center;
      line-height: 1.25
    }

    .count-lead,
    .count-time { display: block }
    .count-lead { font-size: 10px; opacity: .8; margin-bottom: 3px }
    .count-time { font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; direction: rtl }

    .final-state,
    .winners {
      background: var(--paper);
      border: 1px solid var(--rule);
      border-radius: 18px;
      padding: 22px 18px;
      text-align: center;
    }

    .final-state {
      background: linear-gradient(145deg, rgba(76, 90, 62, .11), rgba(248, 245, 238, .96));
    }

    .final-kicker { display: block; color: var(--muted); font: 300 11px "Montserrat Alternates", sans-serif; letter-spacing: .15em; direction: ltr }
    .final-state h1, .winners h2 { margin: 8px 0; color: var(--green); font-size: clamp(25px, 7vw, 32px); line-height: 1.25 }
    .final-state p { margin: 0 auto; max-width: 30ch; color: var(--muted); font-size: 14px }
    .winner-list { display: grid; gap: 8px; margin-top: 14px }
    .winner-card { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; padding: 11px; border-radius: 12px; background: #fff; border: 1px solid var(--rule); text-align: right }
    .winner-card.first { background: linear-gradient(135deg, #fffaf0, #f4ecd4); border-color: rgba(154, 120, 42, .38) }
    .winner-medal { font-size: 22px; text-align: center }
    .winner-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
    .winner-score { color: var(--green); font: 600 19px "Bodoni Moda", Georgia, serif; font-variant-numeric: tabular-nums; direction: ltr }

    html.competition-final #regPanel,
    html.competition-final #gameArea,
    html.competition-final #result,
    html.competition-final #shotPage,
    html.competition-final .prize,
    html.competition-final .terms { display: none !important }
    html.competition-final #finalState,
    html.competition-final #winners { display: block !important }
    html.competition-final #boardTitle { font-size: 24px }

    @media (max-width: 380px) {
      header { align-items: flex-start }
      .count { padding: 6px 8px }
      .count-time { font-size: 10px }
      .wrap { padding-inline: 12px }
    }

    /* prize banner */
    .prize {
      display: flex;
      gap: 12px;
      align-items: center;
      border-block: 1px solid var(--rule);
      padding-block: 10px
    }

    .prize .cupmark {
      width: 38px;
      height: 46px;
      flex: none
    }

    .prize p {
      margin: 0;
      font-size: 13px;
      line-height: 1.5
    }

    .prize b {
      font-weight: 600;
      color: var(--green);
      font-size: 15px;
      display: block
    }

    h1,
    h2,
    h3 {
      text-wrap: balance
    }

    .panel {
      background: var(--paper);
      border: 1px solid var(--rule);
      border-radius: 18px;
      padding: 18px;
      display: flex;
      flex-direction: column;
      gap: 14px
    }

    .panel h2 {
      margin: 0;
      font-weight: 800;
      color: var(--green);
      font-size: clamp(26px, 8vw, 34px);
      line-height: 1.15
    }

    .panel .sub {
      margin: 0;
      color: var(--muted);
      font-size: 14px
    }

    .fields {
      display: grid;
      gap: 10px
    }

    label {
      font-size: 13px;
      display: block;
      margin-bottom: 4px;
      font-weight: 400
    }

    label .opt {
      color: var(--muted);
      font-weight: 300
    }

    input[type=text],
    input[type=tel] {
      width: 100%;
      box-sizing: border-box;
      font: inherit;
      font-weight: 400;
      padding: 11px 12px;
      border-radius: 10px;
      border: 1px solid var(--rule);
      background: #fff;
      color: var(--ink)
    }

    input[type=tel],
    #insta {
      direction: ltr;
      text-align: right
    }

    .avatars {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      border: 0;
      padding: 0;
      margin: 0
    }

    .avatars legend {
      font-size: 13px;
      font-weight: 400;
      margin-bottom: 6px;
      padding: 0
    }

    .av {
      position: relative
    }

    .av input {
      position: absolute;
      opacity: 0;
      inset: 0;
      margin: 0;
      cursor: pointer
    }

    .av span {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      padding: 8px 4px 6px;
      border-radius: 12px;
      border: 1px solid var(--rule);
      background: #fff;
      font-size: 12px;
      cursor: pointer
    }

    .av canvas {
      width: 52px;
      height: 52px
    }

    .av input:checked+span {
      border: 2px solid var(--green);
      background: rgba(76, 90, 62, .08);
      padding: 7px 3px 5px
    }

    .av input:focus-visible+span {
      outline: 3px solid var(--green);
      outline-offset: 2px
    }

    .consent {
      display: flex;
      gap: 8px;
      align-items: flex-start;
      font-size: 12px;
      color: var(--muted)
    }

    .consent input {
      margin-top: 4px;
      accent-color: var(--green)
    }

    .err {
      color: var(--warn);
      font-size: 13px;
      margin: 0;
      min-height: 1em
    }

    .btn {
      font: inherit;
      font-weight: 600;
      border-radius: 999px;
      cursor: pointer;
      padding: 12px 28px;
      border: 1px solid var(--green);
      background: var(--green);
      color: var(--cream);
      font-size: 16px
    }

    .btn.ghost {
      background: transparent;
      color: var(--green);
      font-weight: 400;
      font-size: 14px;
      padding: 9px 18px
    }

    .btn.link {
      background: none;
      border: 0;
      padding: 0;
      color: var(--green);
      font-size: 13px;
      font-weight: 400;
      text-decoration: underline;
      text-underline-offset: 3px
    }

    .btn:focus-visible,
    .sound:focus-visible,
    .fullscreen:focus-visible,
    a:focus-visible,
    input:focus-visible {
      outline: 3px solid var(--green);
      outline-offset: 2px
    }

    .stage {
      position: relative;
      border-radius: 18px;
      overflow: hidden;
      background: var(--paper);
      border: 1px solid var(--rule);
      touch-action: pan-y;
      user-select: none;
      -webkit-user-select: none
    }

    canvas#cv {
      display: block;
      width: 100%;
      aspect-ratio: 3/4;
      max-width: 100%;
      cursor: pointer;
      touch-action: pan-y;
      user-select: none;
      -webkit-user-select: none
    }

    .stage.is-playing,
    .stage.is-playing canvas#cv {
      touch-action: none;
      overscroll-behavior: contain
    }

    .stage.hit {
      animation: hit .35s
    }

    @keyframes hit {
      20% {
        transform: translate(-6px, 2px)
      }

      40% {
        transform: translate(5px, -2px)
      }

      60% {
        transform: translate(-3px, 1px)
      }

      80% {
        transform: translate(2px, 0)
      }
    }

    .sound {
      position: absolute;
      top: 10px;
      left: 10px;
      z-index: 2;
      font: inherit;
      font-size: 12px;
      background: rgba(248, 245, 238, .85);
      color: var(--green);
      border: 1px solid var(--rule);
      border-radius: 999px;
      padding: 4px 10px;
      cursor: pointer
    }

    .fullscreen {
      position: absolute;
      top: 10px;
      right: 10px;
      z-index: 4;
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      font: inherit;
      font-size: 18px;
      line-height: 1;
      background: rgba(248, 245, 238, .85);
      color: var(--green);
      border: 1px solid var(--rule);
      border-radius: 999px;
      padding: 0;
      cursor: pointer
    }

    body.app-fullscreen-open {
      position: fixed;
      left: 0;
      right: 0;
      width: 100%;
      overflow: hidden
    }

    .stage.app-fullscreen,
    .stage:fullscreen {
      position: fixed;
      inset: 0;
      width: 100vw;
      height: 100vh;
      height: 100dvh;
      max-width: none;
      border-radius: 0;
      z-index: 10000;
      display: grid;
      place-items: center;
      box-sizing: border-box;
      padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)
    }

    .stage.app-fullscreen canvas#cv,
    .stage:fullscreen canvas#cv {
      width: min(100%, calc(100dvh * .75));
      height: auto;
      max-height: 100%;
      object-fit: contain
    }

    .stage:-webkit-full-screen {
      width: 100vw;
      height: 100vh;
      height: 100dvh;
      max-width: none;
      border-radius: 0;
      display: grid;
      place-items: center;
      box-sizing: border-box;
      padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)
    }

    .stage:-webkit-full-screen canvas#cv {
      width: min(100%, calc(100dvh * .75));
      height: auto;
      max-height: 100%;
      object-fit: contain
    }

    .stage.app-fullscreen canvas#cv,
    .stage:fullscreen canvas#cv,
    .stage:-webkit-full-screen canvas#cv {
      position: relative;
      z-index: 1
    }

    .stage.app-fullscreen .fullscreen,
    .stage:fullscreen .fullscreen,
    .stage:-webkit-full-screen .fullscreen {
      position: fixed;
      top: calc(env(safe-area-inset-top, 0px) + 12px);
      right: calc(env(safe-area-inset-right, 0px) + 12px);
      z-index: 2147483647;
      display: flex;
      align-items: center;
      justify-content: center;
      visibility: visible;
      opacity: 1;
      pointer-events: auto
    }

    .stage:-webkit-full-screen canvas#cv {
      width: min(100vw, calc(100vh * .75));
      height: auto
    }

    .overlay {
      position: absolute;
      inset: 0;
      z-index: 3;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 12px;
      padding: 22px;
      text-align: center;
      background: rgba(248, 245, 238, .9)
    }

    .overlay h3 {
      font-weight: 800;
      color: var(--green);
      font-size: clamp(26px, 8.5vw, 38px);
      line-height: 1.15;
      margin: 0
    }

    .overlay p {
      margin: 0;
      max-width: 30ch
    }

    .overlay canvas {
      width: 84px;
      height: 84px
    }

    .rules {
      display: flex;
      flex-direction: column;
      gap: 4px;
      font-size: 13px;
      text-align: right
    }

    .rules b {
      color: var(--green);
      font-weight: 600
    }

    .hint {
      font-size: 12px;
      color: var(--muted);
      margin: 0;
      text-align: center
    }

    .result {
      background: var(--green);
      color: var(--cream);
      border-radius: 18px;
      overflow: hidden;
      padding: 22px 18px 42px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='14' viewBox='0 0 40 14'%3E%3Cpath d='M0 14L7 6l3 3 6-8 7 9 3-3 5 4 4-5 5 8z' fill='%23F0EADD'/%3E%3C/svg%3E");
      background-repeat: repeat-x;
      background-position: 0 100%;
      background-size: 40px 14px;
    }

    .result .top {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 12px
    }

    .result .label {
      font-size: 12px;
      opacity: .75;
      margin: 0
    }

    .result h2 {
      margin: 0;
      font-size: 24px;
      font-weight: 600;
      line-height: 1.25
    }

    .big {
      font-family: "Bodoni Moda", Didot, Georgia, serif;
      font-weight: 600;
      font-size: 56px;
      line-height: .9;
      direction: ltr;
      font-variant-numeric: tabular-nums
    }

    .meta {
      display: flex;
      flex-wrap: wrap;
      gap: 6px 18px;
      font-size: 13px
    }

    .meta b {
      font-weight: 600;
      font-variant-numeric: tabular-nums
    }

    .status {
      font-size: 13px;
      margin: 0;
      padding: 8px 12px;
      border-radius: 10px;
      background: rgba(240, 234, 221, .14)
    }

    .share {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px
    }

    .share .btn {
      background: var(--cream);
      color: var(--green);
      border-color: var(--cream);
      font-size: 14px;
      padding: 11px 12px
    }

    .share .btn.ghost {
      background: transparent;
      color: var(--cream)
    }

    .result .btn:focus-visible,
    .result a:focus-visible {
      outline-color: var(--cream)
    }

    .result .btn.again {
      background: transparent;
      color: var(--cream);
      border-color: var(--cream);
      font-weight: 400;
      font-size: 14px;
      padding: 9px 18px;
      justify-self: start
    }

    .small {
      font-size: 12px;
      margin: 0;
      opacity: .85
    }

    .shot-mode {
      background: var(--green);
    }

    .shot-mode .wrap {
      max-width: none;
      width: 100%;
      padding: 0;
    }

    .shot-mode .wrap > :not(.shot-page) {
      display: none !important;
    }

    .shot-page {
      min-height: 100svh;
      width: 100%;
      margin: 0;
      padding: 16px 14px 28px;
      box-sizing: border-box;
      background:
        linear-gradient(180deg, rgba(47, 56, 38, .38), rgba(47, 56, 38, 0) 140px),
        var(--cream);
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .shot-page[hidden] {
      display: none !important;
    }

    .shot-bar {
      width: min(calc(100vw - 28px), 390px);
      align-self: center;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
    }

    .shot-bar .btn {
      padding: 9px 14px;
      font-size: 13px;
      background: rgba(240, 234, 221, .92);
      color: var(--green);
      border-color: rgba(240, 234, 221, .92);
    }

    .shot-card {
      width: min(calc(100vw - 28px), 390px);
      align-self: center;
      border-radius: 18px;
      overflow: hidden;
      box-shadow: 0 18px 42px rgba(47, 56, 38, .22);
      background: var(--cream);
    }

    .shot-card canvas {
      display: block;
      width: 100%;
      aspect-ratio: 9/16;
      background: var(--cream);
    }

    .shot-rank {
      width: min(calc(100vw - 28px), 390px);
      align-self: center;
      color: var(--green);
      text-align: center;
      display: grid;
      gap: 7px;
    }

    .shot-rank .score {
      margin: 0;
      font-family: "Bodoni Moda", Didot, Georgia, serif;
      font-size: 42px;
      line-height: 1;
      direction: ltr;
      font-variant-numeric: tabular-nums;
    }

    .shot-rank .line {
      margin: 0;
      font-size: 16px;
      font-weight: 600;
    }

    .shot-rank .note,
    .shot-footer .made {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
    }

    .shot-rank .note a,
    .shot-footer .made a {
      color: var(--green);
      font-weight: 600;
      text-decoration: none;
      border-bottom: 1px solid var(--rule);
    }

    .shot-footer {
      width: min(calc(100vw - 28px), 390px);
      align-self: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      padding-block: 2px 10px;
      text-align: center;
    }

    .shot-social {
      display: flex;
      justify-content: center;
      gap: 18px;
    }

    .shot-social a {
      width: 54px;
      height: 54px;
      border-radius: 50%;
      background: var(--green);
      display: grid;
      place-items: center;
    }

    .shot-social svg {
      width: 24px;
      height: 24px;
    }

    .shot-footer .tag-line {
      color: var(--green);
      font-family: "Montserrat Alternates", sans-serif;
      font-weight: 300;
      font-size: 16px;
      letter-spacing: .08em;
      direction: ltr;
    }

    /* leaderboard */
    .board h2 {
      font-size: 22px
    }

    .board ol {
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      flex-direction: column
    }

    .board li {
      display: grid;
      grid-template-columns: 28px 36px 1fr auto;
      align-items: center;
      gap: 10px;
      padding-block: 7px;
      border-bottom: 1px solid var(--rule);
      font-variant-numeric: tabular-nums
    }

    .board li:last-child {
      border-bottom: 0
    }

    .board .pos {
      font-family: "Bodoni Moda", Didot, Georgia, serif;
      font-weight: 600;
      font-size: 18px;
      color: var(--green);
      text-align: center
    }

    .board li.gold .pos {
      color: var(--cream);
      background: var(--green);
      border-radius: 50%;
      width: 28px;
      height: 28px;
      line-height: 28px;
      font-size: 15px
    }

    .board canvas {
      width: 36px;
      height: 36px
    }

    .board .nm {
      font-weight: 400;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap
    }

    .board .sc {
      font-weight: 600;
      color: var(--green);
      font-size: 17px
    }

    .board li.me {
      background: rgba(76, 90, 62, .08);
      border-radius: 10px;
      padding-inline: 6px
    }

    .board .empty {
      color: var(--muted);
      font-size: 14px;
      margin: 0
    }

    .tag {
      font-size: 11px;
      color: var(--warn);
      border: 1px solid currentColor;
      border-radius: 999px;
      padding: 1px 8px;
      margin-inline-start: 6px;
      vertical-align: middle;
      font-weight: 400
    }

    .board .head {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 8px;
      flex-wrap: wrap
    }

    .board .upd {
      font-size: 12px;
      color: var(--muted)
    }

    .terms h2 {
      font-size: 20px
    }

    .terms ol {
      margin: 0;
      padding-inline-start: 20px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      font-size: 14px
    }

    .terms b {
      font-weight: 600;
      color: var(--green)
    }

    .social {
      display: flex;
      justify-content: center;
      gap: 14px
    }

    .social a {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: var(--green);
      display: grid;
      place-items: center
    }

    .social svg {
      width: 22px;
      height: 22px
    }

    footer {
      text-align: center;
      display: flex;
      flex-direction: column;
      gap: 6px;
      align-items: center
    }

    footer .tag-line {
      color: var(--green);
      font-family: "Montserrat Alternates", sans-serif;
      font-weight: 300;
      font-size: 13px;
      letter-spacing: .08em;
      direction: ltr
    }

    footer .made {
      font-size: 12px;
      color: var(--muted)
    }

    footer .made a {
      color: var(--green);
      font-weight: 600;
      text-decoration: none;
      border-bottom: 1px solid var(--rule)
    }

    @media (prefers-reduced-motion:reduce) {
      .stage.hit {
        animation: none
      }
    }
