
  @property --ba { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
  :root{
    --bg:#0B0B0D;            /* 검은 돌 배경 */
    --txt:#EFEBE3;           /* 크림 */
    --muted:#827d77;
    --accent:#6E1423;        /* 다크 버건디 */
    --accent-2:#8a2030;
    --accent-dim:#5a2530;
    --accent-text:#E6A9B0;   /* 파스텔 로즈 */
    --accent-glow:rgba(110,20,35,0.22);
    --metal-2:#a8895c;       /* 황동 — 1px 라인 전용 */
    --grain-opacity:0.07; --stone-opacity:0.55;
  }
  *{box-sizing:border-box}
  html,body{margin:0;height:100%}
  body{
    background:
      radial-gradient(110% 70% at 8% -5%, var(--accent-glow), transparent 45%),
      radial-gradient(90% 60% at 100% 105%, var(--accent-glow), transparent 50%),
      var(--bg);
    background-attachment:fixed;
    color:var(--txt);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px;
    overflow-x:hidden;
    font-family:'Pretendard','Pretendard Variable',system-ui,-apple-system,'Segoe UI',Roboto,'Apple SD Gothic Neo',sans-serif}

  /* 돌결 질감 + 미세 그레인 */
  body::before{content:"";position:fixed;inset:0;z-index:0;pointer-events:none;
    opacity:var(--stone-opacity);mix-blend-mode:overlay;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.016' numOctaves='5' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.6'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E")}
  body::after{content:"";position:fixed;inset:0;z-index:9999;pointer-events:none;
    opacity:var(--grain-opacity);mix-blend-mode:soft-light;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}

  #root{width:100%;max-width:360px;position:relative;z-index:1}
  .mono{font-family:ui-monospace,Menlo,Consolas,monospace}

  .card{position:relative;background:linear-gradient(180deg,#201e28,#18171f);
    border:1px solid #3a3742;border-radius:22px;padding:28px 26px 22px;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.06),
      0 0 0 1px rgba(168,137,92,.14),
      0 26px 70px rgba(0,0,0,.62),
      0 0 70px rgba(110,20,35,.22);
    animation:cardIn .45s ease both;text-align:center;
    transition:box-shadow .6s ease, border-color .6s ease}
  .card.ok{border-color:rgba(43,209,111,.28);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.06),
      0 0 0 1px rgba(43,209,111,.20),
      0 26px 70px rgba(0,0,0,.62),
      0 0 95px rgba(43,209,111,.20)}
  @keyframes cardIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
  h1{margin:0 0 4px;font-size:21px;font-weight:700;letter-spacing:-.2px;transition:opacity .4s,color .4s;text-shadow:0 1px 18px rgba(0,0,0,.35)}
  .sub{margin:0;color:var(--muted);font-size:13.5px;line-height:1.55;transition:opacity .4s}

  /* 황동 머리표 (양옆 1px 헤어라인 + 자물쇠) */
  .eyebrow-c{display:flex;align-items:center;justify-content:center;gap:9px;margin:2px 0 14px;
    font:11px/1 ui-monospace,Menlo,Consolas,monospace;text-transform:uppercase;letter-spacing:.24em;
    color:#a8895c;transition:color .45s}
  .eyebrow-c::before,.eyebrow-c::after{content:"";width:24px;height:1px;
    background:linear-gradient(90deg,transparent,rgba(168,137,92,.6))}
  .eyebrow-c::after{background:linear-gradient(90deg,rgba(168,137,92,.6),transparent)}
  .eyebrow-c .lock{width:12px;height:12px;stroke:currentColor;stroke-width:1.6;fill:none;
    stroke-linecap:round;stroke-linejoin:round;opacity:.95}
  .eyebrow-c.ok{color:#4ec98a}

  .stage{position:relative;height:84px;margin:26px 0 22px;display:grid;place-items:center}

  /* 칸 크기는 자릿수(--n)를 보고 줄어든다 — 6자리 이상도 좁은 화면에서 넘치지 않는다.
     --n 은 Gate 컴포넌트가 인라인으로 넣어 준다(없으면 4자리 기본값). */
  .otp{position:absolute;display:flex;gap:var(--gap);transition:opacity .55s ease, transform .65s cubic-bezier(.5,0,.2,1);
    --n:4; --gap:13px;
    --cell:min(60px, calc((100vw - 44px - (var(--n) - 1) * var(--gap)) / var(--n)));
    --r:calc(var(--cell) / 4);
    --g1:#8a2030; --g2:#E6A9B0}
  @media (max-width:430px){ .otp{--gap:9px} }
  .otp.error{--g1:#e5544b; --g2:#ff8a8a}
  .otp.collapse{opacity:0;transform:scale(.5)}
  .otp.shake{animation:shake .45s}
  @keyframes shake{10%,90%{transform:translateX(-2px)}20%,80%{transform:translateX(4px)}30%,50%,70%{transform:translateX(-7px)}40%,60%{transform:translateX(7px)}}

  .box{position:relative;width:var(--cell);height:calc(var(--cell) * 7 / 6);border-radius:var(--r);
    background:linear-gradient(180deg,#221f2b,#191820);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 0 1px rgba(168,137,92,.12), 0 2px 7px rgba(0,0,0,.4);
    transition:box-shadow .3s ease, transform .3s cubic-bezier(.34,1.4,.5,1), background .3s ease}
  .box::before{content:'';position:absolute;inset:0;border-radius:var(--r);padding:1.5px;
    background:conic-gradient(from var(--ba), transparent 0deg, var(--g1) 55deg, var(--g2) 115deg, transparent 175deg, transparent 360deg);
    -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite:xor; mask-composite:exclude;
    opacity:0; transition:opacity .4s ease; filter:drop-shadow(0 0 6px var(--g1))}
  .box:focus-within{transform:translateY(-2px);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 1px var(--accent-dim), 0 10px 26px rgba(110,20,35,.32)}
  .box:focus-within::before{opacity:.95; animation:rot 3.6s linear infinite}
  .box.filled{background:linear-gradient(180deg,#2b1822,#211520);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 0 1px rgba(230,169,176,.24), 0 3px 10px rgba(0,0,0,.45)}
  .box.filled input{color:var(--accent-text)}
  .otp.verifying .box::before{opacity:1; animation:rot .9s linear infinite}
  .box:nth-child(2)::before{animation-delay:-.7s}
  .box:nth-child(3)::before{animation-delay:-1.4s}
  .box:nth-child(4)::before{animation-delay:-2.1s}
  .box:nth-child(5)::before{animation-delay:-2.8s}
  .box:nth-child(6)::before{animation-delay:-3.5s}
  @keyframes rot{to{--ba:360deg}}
  .box input{position:absolute;inset:0;width:100%;height:100%;background:transparent;border:0;border-radius:var(--r);
    text-align:center;color:var(--txt);font-size:calc(var(--cell) * 13 / 30);font-weight:600;outline:none;caret-color:var(--g2);transition:color .25s ease}

  /* 성공 — 초록 글로우 + 흰 체크 */
  .check{position:absolute;width:80px;height:80px;border-radius:22px;
    background:radial-gradient(120% 120% at 50% 22%, #103a23, #0a1a11);
    border:2px solid #2bd16f;display:grid;place-items:center;
    box-shadow:0 0 0 4px rgba(43,209,111,.16), 0 0 34px rgba(43,209,111,.6), 0 0 80px rgba(43,209,111,.32), inset 0 0 20px rgba(43,209,111,.20);
    opacity:0;transform:scale(.25);transition:opacity .55s ease .5s, transform .85s cubic-bezier(.34,1.5,.5,1) .5s}
  .check.show{opacity:1;transform:scale(1);animation:pulse 2.4s ease-in-out 1.4s infinite}
  @keyframes pulse{
    0%,100%{box-shadow:0 0 0 4px rgba(43,209,111,.16),0 0 30px rgba(43,209,111,.5),0 0 70px rgba(43,209,111,.26),inset 0 0 20px rgba(43,209,111,.18)}
    50%{box-shadow:0 0 0 6px rgba(43,209,111,.22),0 0 46px rgba(43,209,111,.75),0 0 105px rgba(43,209,111,.4),inset 0 0 24px rgba(43,209,111,.26)}}
  .check svg{width:36px;height:36px}
  .check path{stroke:#ffffff;stroke-width:3.2;fill:none;stroke-linecap:round;stroke-linejoin:round;
    stroke-dasharray:40;stroke-dashoffset:40;animation:draw .55s ease 1.05s forwards;filter:drop-shadow(0 0 4px rgba(43,209,111,.5))}
  @keyframes draw{to{stroke-dashoffset:0}}

  .hint{display:block;margin-top:9px;font-size:11.5px;color:#5d5f68;text-align:center}

  /* reveal 모드 데모용 보호 콘텐츠 (실제 사이트에선 이 자리에 진짜 내용) */
  #protected{display:none;text-align:center;position:relative;z-index:1}

.gate-submit{background:#6E1423;color:white;border:1px solid #8a2030;border-radius:9px;padding:10px 22px;font:inherit;margin-top:15px;cursor:pointer}.gate-submit:focus-visible{outline:2px solid #E6A9B0;outline-offset:3px}#gate-message{min-height:22px}.eyebrow-c{letter-spacing:.05em}.sub{color:#B9B3A8}
