/* 卓上三角名札メーカー */
.ns-toolbar { gap: 10px; flex-wrap: wrap; }
.ns-tb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ns-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 18px; align-items: start; margin-top: 12px; }
@media (max-width: 1080px) { .ns-layout { grid-template-columns: 1fr; } .ns-right { order: -1; } }
.ns-left, .ns-right { min-width: 0; display: grid; gap: 12px; }
.ns-right { position: sticky; top: calc(var(--header-h, 64px) + 8px); }
@media (max-width: 1080px) { .ns-right { position: static; } }
.ns-card { border: 1px solid var(--line); border-radius: 16px; background: var(--card2); padding: 12px 14px; box-shadow: var(--sh-sm); min-width: 0; }
.ns-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ns-h .sp { flex: 1; }
.ns-scenes { display: flex; flex-wrap: wrap; gap: 6px; }
.ns-summary .note { font-size: 14px; }

/* 名簿の表 */
.ns-table { display: grid; gap: 6px; }
.ns-row { display: grid; grid-template-columns: 22px minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, 1.1fr) minmax(0, .8fr) auto; gap: 6px; align-items: center; }
.ns-row .input { padding: 7px 9px; font-size: 14px; min-width: 0; }
.ns-row .ns-in-name { font-weight: 700; }
.ns-thead { font-size: 11.5px; color: var(--ink3); font-weight: 700; }
.ns-no { font-size: 12px; color: var(--ink3); text-align: right; font-variant-numeric: tabular-nums; }
.ns-ops { display: flex; gap: 2px; }
.ns-ops .icon-btn { width: 30px; height: 30px; font-weight: 800; }
.ns-ops .i { width: 15px; height: 15px; }
.ns-warn { grid-column: 2 / -1; color: var(--warn); margin-top: -2px; }
@media (max-width: 720px) {
  .ns-thead { display: none; }
  .ns-row { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr); padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
  .ns-row > .ns-no { grid-row: span 2; align-self: start; padding-top: 10px; }
  .ns-ops { grid-column: 2 / -1; justify-content: flex-end; }
}

/* 設定 */
.ns-settings { display: grid; gap: 10px; }
.ns-sec { border: 1px solid var(--line); border-radius: 14px; background: var(--card2); box-shadow: var(--sh-sm); }
.ns-sec > summary { cursor: pointer; padding: 11px 14px; font-weight: 800; list-style: none; display: flex; justify-content: space-between; }
.ns-sec > summary::-webkit-details-marker { display: none; }
.ns-sec > summary::after { content: '▾'; color: var(--ink3); }
.ns-sec:not([open]) > summary::after { content: '▸'; }
.ns-sec > div { padding: 0 14px 14px; }
.ns-sizes { display: grid; gap: 6px; }
.ns-size { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 10px; cursor: pointer; font-size: 14px; background: var(--card); }
.ns-size.on { border-color: var(--accent, var(--blue)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, var(--blue)) 18%, transparent); font-weight: 700; }
.ns-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.ns-color { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-soft); background: var(--card); border-radius: 999px; padding: 4px 10px 4px 5px; font-size: 13px; cursor: pointer; color: var(--ink); }
.ns-color i { width: 18px; height: 18px; border-radius: 50%; background: var(--c); display: block; }
.ns-color.on { border-color: var(--c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 30%, transparent); font-weight: 700; }
.ns-gk { margin: 2px 4px; }
.ns-settings .seg { flex-wrap: wrap; }

/* プレビュー */
.ns-pager { display: flex; align-items: center; gap: 4px; }
.ns-stage { position: relative; overflow: hidden; border-radius: 12px; background: radial-gradient(120% 90% at 50% 0%, #fbfaf6 0%, #ece6da 100%); margin-bottom: 10px; }
.ns3-scene { position: relative; perspective: 1600px; perspective-origin: 50% 20%; display: flex; align-items: center; justify-content: center; }
.ns3-scale { transform-style: preserve-3d; }
.ns3-prism { position: relative; transform-style: preserve-3d; animation: ns3swing 7s ease-in-out infinite alternate; }
.ns3-prism.flip { animation-name: ns3swingB; }
@keyframes ns3swing { from { transform: rotateX(-16deg) rotateY(-30deg); } to { transform: rotateX(-16deg) rotateY(30deg); } }
@keyframes ns3swingB { from { transform: rotateX(-16deg) rotateY(150deg); } to { transform: rotateX(-16deg) rotateY(210deg); } }
@media (prefers-reduced-motion: reduce) { .ns3-prism { animation: none; transform: rotateX(-16deg) rotateY(-22deg); } .ns3-prism.flip { transform: rotateX(-16deg) rotateY(158deg); } }
.ns3-f { position: absolute; left: 0; top: 0; backface-visibility: hidden; background: #fff; box-shadow: inset 0 0 0 .2mm rgba(0, 0, 0, .08); }
.ns3-f .nsf { background: #fff; }
.ns3-f.in { background: #e8e3d8; }
.ns3-base { position: absolute; left: 0; top: 0; background: #ddd6c8; }
.ns3-shadow { position: absolute; left: 14%; right: 14%; bottom: 26px; height: 18px; border-radius: 50%; background: radial-gradient(closest-side, rgba(40, 30, 10, .22), transparent); pointer-events: none; }
.ns3-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 0 12px 12px; position: relative; }
.ns3-tools .muted { color: #6a6458; }
.ns-sheetbox { position: relative; overflow: hidden; border-radius: 10px; background: #8d929b; padding: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.ns-scaler { transform-origin: 0 0; position: absolute; left: 0; top: 0; }
.ns-scaler .nss { box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.ns-sheetbox.mini { max-width: 100%; }
:root[data-theme="dark"] .ns-stage { background: radial-gradient(120% 90% at 50% 0%, #2a2f3a 0%, #1a1e26 100%); }
:root[data-theme="dark"] .ns3-tools .muted { color: var(--ink2); }
.ns-maptable select { min-width: 96px; padding: 5px 6px; font-size: 13px; }
