/* 公平指名ルーレット */
.sm-ctrl { display: grid; gap: 8px; margin-bottom: 12px; }
.sm-ctrl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sm-lab { font-weight: 900; font-size: 13.5px; min-width: 2.6em; }
.sm-wrap { position: relative; border: 2px solid var(--line); border-radius: 22px; background: var(--board); color: var(--chalk); padding: 14px; box-shadow: var(--sh); font-size: clamp(30px, 6vw, 64px); display: grid; gap: 12px; outline: none; }
.sm-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.sm-cls { font-weight: 800; opacity: .85; }
.sm-fs { background: rgba(255, 255, 255, .1); color: var(--chalk); border-color: rgba(255, 255, 255, .5); box-shadow: none; }
.sm-stage { min-height: 3.2em; display: grid; place-items: center; border-radius: 16px; outline: none; position: relative; }
.sm-stage.sm-flash { animation: sm-flash 1s ease-out; }
@keyframes sm-flash { 0% { box-shadow: 0 0 0 0 rgba(255, 210, 63, .9); } 100% { box-shadow: 0 0 0 30px rgba(255, 210, 63, 0); } }
.sm-msg { font-size: 18px; opacity: .85; text-align: center; padding: 30px 0; }
.sm-reels { display: flex; flex-wrap: wrap; justify-content: center; gap: .3em; width: 100%; }
.sm-reels.multi { font-size: .62em; }
.sm-reel { position: relative; height: 4.5em; overflow: hidden; min-width: min(7em, 100%); flex: 1 1 6em; max-width: 12em; border-radius: .3em; background: rgba(0, 0, 0, .25); -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.sm-reel::after { content: ''; position: absolute; left: 4%; right: 4%; top: 1.5em; height: 1.5em; border-top: 3px solid var(--yellow); border-bottom: 3px solid var(--yellow); pointer-events: none; }
.sm-strip { will-change: transform; }
.sm-line { height: 1.5em; line-height: 1.5em; text-align: center; font-family: var(--head); font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 .2em; }
.sm-line.idle { margin-top: 1.5em; opacity: .5; }
.sm-reel.stop .sm-strip { animation: sm-bump .35s ease-out; }
.sm-reel.stop { background: rgba(255, 210, 63, .14); }
@keyframes sm-bump { 50% { filter: brightness(1.6); } }
.sm-wheel { width: min(100%, 460px); margin: 0 auto; }
.sm-wheel svg { display: block; width: 100%; height: auto; font-family: var(--font); }
.sm-wg { will-change: transform; }
.sm-seg.win path { stroke: #fff; stroke-width: 3; filter: brightness(1.15); }
.sm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; width: 100%; perspective: 800px; }
.sm-card { aspect-ratio: 3 / 4; border: 0; padding: 0; background: none; cursor: pointer; }
.sm-cin { position: relative; width: 100%; height: 100%; transition: transform .55s cubic-bezier(.3, 1.4, .5, 1); transform-style: preserve-3d; }
.sm-card.open .sm-cin { transform: rotateY(180deg); }
.sm-back, .sm-face { position: absolute; inset: 0; border-radius: 10px; display: grid; place-items: center; backface-visibility: hidden; border: 2px solid #0a1a16; font-weight: 900; }
.sm-back { background: repeating-linear-gradient(45deg, var(--coral) 0 8px, #ff8577 8px 16px); color: #fff; font-size: 16px; text-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.sm-face { background: var(--yellow); color: #1d2433; transform: rotateY(180deg); font-size: 13px; padding: 2px; line-height: 1.2; word-break: break-all; }
.sm-cards.shuffle .sm-card { animation: sm-shake .7s ease-in-out; }
@keyframes sm-shake { 20% { transform: translate(-4px, 3px) rotate(-6deg); } 50% { transform: translate(5px, -3px) rotate(5deg); } 80% { transform: translate(-2px, 1px) rotate(-2deg); } }
.sm-cards.fin .sm-card:not(.open) { opacity: .25; }
.sm-card.open { z-index: 2; }
.sm-hint { font-size: 14px; text-align: center; opacity: .85; margin-top: 8px; }
.sm-hint.big { font-size: 18px; font-weight: 800; color: var(--yellow); opacity: 1; }
.sm-gorow { display: flex; justify-content: center; }
.sm-go { min-width: min(320px, 100%); font-size: 20px; }
.sm-result { display: grid; gap: 8px; }
.sm-result:empty { display: none; }
.sm-ritem { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .08); animation: hw-in .4s ease-out; }
@keyframes hw-in { from { opacity: 0; transform: scale(.9); } }
.sm-ritem.undone { opacity: .5; }
.sm-rname { font-family: var(--head); font-size: 1em; color: var(--yellow); line-height: 1.2; text-align: center; }
.sm-rbtns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.sm-rb { border: 2px solid rgba(255, 255, 255, .6); background: transparent; color: var(--chalk); border-radius: 99px; padding: 4px 12px; font-weight: 800; font-size: 14px; min-height: 36px; }
.sm-rb.on { background: var(--rc); border-color: #fff; color: #fff; }
.sm-rb.undo { border-style: dashed; opacity: .8; }
.sm-abs { margin-top: 12px; }
.sm-abs summary { cursor: pointer; }
.sm-chips { margin-top: 8px; }
.sm-chips .chip { font-size: 13px; padding: 4px 10px; }
.sm-chk { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.sm-chk input { width: 18px; height: 18px; accent-color: var(--ink); }
.sm-wrap:fullscreen { font-size: 8vw; padding: 3vw; align-content: center; border-radius: 0; border: 0; }
.sm-wrap:fullscreen .sm-cards { grid-template-columns: repeat(auto-fill, minmax(8vw, 1fr)); }
.sm-wrap:fullscreen .sm-face { font-size: 1.6vw; }
.sm-wrap:fullscreen .sm-wheel { width: min(70vh, 100%); }
/* 記録 */
.sm-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .sm-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sm-sum > div { border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; background: var(--card2); display: grid; }
.sm-sum small { font-size: 12px; color: var(--ink2); font-weight: 700; }
.sm-sum b { font-size: 26px; font-family: var(--head); line-height: 1.2; }
.sm-sum span { font-size: 12px; color: var(--ink2); }
.sm-sum .warn { background: color-mix(in srgb, var(--warn) 12%, var(--card)); }
.sm-sum .ok { background: color-mix(in srgb, var(--ok) 10%, var(--card)); }
.sm-legend { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.sm-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.sm-bars { display: grid; gap: 3px; border: 2px solid var(--line); border-radius: 14px; padding: 8px; background: var(--card); max-height: 560px; overflow-y: auto; }
.sm-bar { display: grid; grid-template-columns: minmax(90px, 9em) minmax(0, 1fr) 2.2em 3.6em 34px; align-items: center; gap: 8px; font-size: 13.5px; min-height: 30px; }
.sm-bn { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-bn small { display: inline-block; width: 2em; color: var(--ink3); font-weight: 400; }
.sm-bt { display: flex; height: 16px; background: var(--bg2); border-radius: 6px; overflow: hidden; }
.sm-bt i { display: block; height: 100%; }
.sm-bc { text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }
.sm-bp { font-size: 11.5px; color: var(--ink2); text-align: right; font-variant-numeric: tabular-nums; }
.sm-plus { width: 30px; height: 30px; border: 1.5px solid var(--line-soft); border-radius: 8px; background: var(--card); font-weight: 900; }
.sm-plus:hover { border-color: var(--line); background: var(--yellow); color: #1d2433; }
@media (max-width: 520px) { .sm-bar { grid-template-columns: minmax(70px, 7em) minmax(0, 1fr) 1.8em 3.2em 30px; gap: 5px; font-size: 12.5px; } }
.sm-h { font-size: 17px; margin: 16px 0 8px; }
.sm-days { display: grid; gap: 6px; }
.sm-day { border: 2px solid var(--line-soft); border-radius: 12px; padding: 6px 10px; background: var(--card); }
.sm-day summary { cursor: pointer; }
.sm-day .chips { margin-top: 6px; }
.sm-logchip { cursor: default; font-size: 12.5px; }
.sm-logchip small { font-size: 11px; color: var(--ink2); }
.sm-logchip button { border: 0; background: none; font-weight: 900; padding: 0 2px; }
