/* NGワードゲーム。モチーフは「おでこに貼る札」。
   白い札=ほかの人のNGワード(見えている言葉)、自分の札は裏向き(群青の水玉)、
   アウトの札にはマゼンタの判を押す。レモン=押すもの */

/* 入口の見本: 札が4枚、1枚は裏向き・1枚はアウト */
.ng-demo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 26px 0 4px; padding: 0; }
.ng-demo .tag { padding: 14px 6px 10px; }
.ng-demo .tag b { font-size: clamp(.95rem, 4.2vw, 1.4rem); }
.ng-demo .tag:nth-child(1) { transform: rotate(-3deg); }
.ng-demo .tag:nth-child(2) { transform: rotate(2deg) translateY(-6px); }
.ng-demo .tag:nth-child(3) { transform: rotate(-1deg); }
.ng-demo .tag:nth-child(4) { transform: rotate(3deg) translateY(-3px); }

.tags { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 12px; }
.tag { position: relative; display: grid; justify-items: center; align-content: start; gap: 2px; background: #fff; color: var(--ink); border-radius: 16px; padding: 18px 8px 12px; text-align: center; overflow: hidden; }
/* 札の上の小さな穴(ひもを通すところ) */
.tag::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--night); position: absolute; top: 7px; left: 50%; margin-left: -6px; }
.tag b { font-family: var(--display); font-weight: 400; font-size: clamp(1.4rem, 6.4vw, 1.9rem); line-height: 1.25; margin-top: 8px; overflow-wrap: anywhere; }
.tag b.long { font-size: clamp(1.15rem, 5vw, 1.5rem); }
.tag b.xlong { font-size: clamp(.95rem, 4.2vw, 1.2rem); }
.tag span, .tag-name { font-size: .86rem; font-weight: 700; color: #6b72a8; overflow-wrap: anywhere; }
.tag.mine { box-shadow: 0 0 0 3px var(--lemon); }
.tag.back { background: var(--night-3) radial-gradient(circle, rgba(255,255,255,.16) 2px, transparent 2.5px) 0 0 / 14px 14px; color: var(--sky); }
.tag.back::before { background: var(--night-2); }
.tag.back b { letter-spacing: .15em; }
.tag.back span, .tag.back .tag-name { color: var(--sky); }
.tag.out { background: #dfe2f6; color: #5a6090; }
.tag.out b { text-decoration: line-through; text-decoration-thickness: 2px; }
.tag i, .stamp-out { position: absolute; top: 8px; right: 6px; transform: rotate(10deg); font-style: normal; font-family: var(--display); color: var(--odd); border: 3px solid var(--odd); border-radius: 10px; padding: 0 7px; font-size: .95rem; letter-spacing: .08em; background: rgba(255,255,255,.85); pointer-events: none; white-space: nowrap; }
.ng-demo .tag i { font-size: .72rem; padding: 0 4px; border-width: 2px; top: 4px; right: 2px; }

.tag-act { width: 100%; margin-top: 8px; display: grid; gap: 4px; justify-items: center; }
.tag-btn { font: inherit; font-weight: 900; width: 100%; min-height: 46px; border: 0; border-radius: 12px; background: var(--odd); color: #fff; cursor: pointer; box-shadow: 0 4px 0 var(--odd-2); font-size: 1.05rem; }
.tag-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--odd-2); }
.tag-btn.self { background: transparent; color: var(--sky); box-shadow: inset 0 0 0 2px var(--line); font-size: .86rem; font-weight: 700; }
.tag .tag-by { font-size: .78rem; color: #6b72a8; }
.tag-undo { font: inherit; font-size: .8rem; font-weight: 700; background: transparent; border: 0; color: var(--night); text-decoration: underline; cursor: pointer; min-height: 36px; padding: 0 8px; }

.alive { font-family: var(--display); font-weight: 400; color: var(--lemon); font-size: 1.15rem; }
.ng-me-out { background: var(--night-2); border-radius: 16px; padding: 12px; }
.ng-me-out b { color: var(--odd); font-family: var(--display); font-weight: 400; font-size: 1.2rem; }

.rb-names { font-weight: 900; font-size: 1.1rem; }
table.res tr.win td:first-child { font-weight: 900; }
.ng-res th, .ng-res td { white-space: nowrap; }
table.res small { display: block; font-size: .78rem; line-height: 1.3; }

@media (max-width: 420px) { .tags { grid-template-columns: 1fr 1fr; gap: 12px 10px; } }

/* 1台モード */
.tags.one { grid-template-columns: 1fr; max-width: 320px; margin: 18px auto 0; }
.tags.one .tag { padding: 28px 14px 26px; transform: rotate(-1.5deg); }
.tags.one .tag b { font-size: clamp(2.4rem, 12vw, 3.4rem); }
.tags.one .tag b.long { font-size: clamp(2rem, 9.6vw, 2.8rem); }
.tags.one .tag b.xlong { font-size: clamp(1.5rem, 7.4vw, 2.1rem); }
.tag.peek { box-shadow: 0 0 0 3px var(--odd); }
.tag-undo.light { color: var(--sky); }
