/* 神运碰碰商户台。设计：安静的工作台 + 唯一醒目的元素「席位票」（开局后发给玩家的链接）。
   公共样式在 /assets/base.css（apps/common），这里只有商户台自己的部分。 */
/* 状态 */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st.waiting { color: var(--warn); }
.st.playing { color: var(--act); }
.st.ended { color: var(--ok); }
.st.cancelled, .st.expired, .st.aborted { color: var(--muted); }
table.t .who { display: flex; gap: 6px; flex-wrap: wrap; }
.dot-seat { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.dot-seat i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid #b5bac6; }
.dot-seat.in i { background: var(--ok); border-color: var(--ok); }
/* ── 开局 ── */
.compose { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tcard { position: relative; display: flex; flex-direction: column; border: 1.5px solid var(--line2); border-radius: var(--r); background: var(--surface); cursor: pointer; text-align: left; padding: 0; overflow: hidden; }
.tcard:hover { border-color: #b9bdc8; }
.tcard.on { border-color: var(--act); box-shadow: 0 0 0 3px var(--act-soft); }
.tcard .art { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 10px; background: #12131c; aspect-ratio: 16 / 7; }
.tcard .art img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.tcard .art.one { grid-template-columns: 1fr; }
.tcard .body { padding: 10px 12px 12px; }
.tcard .body b { display: block; font-size: 15px; line-height: 1.35; }
.tcard .facts { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.tcard .tick { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--act); color: #fff; display: none; place-items: center; }
.tcard.on .tick { display: grid; }
.tcard .tick svg { width: 14px; height: 14px; }
.side { position: sticky; top: 24px; }
.side .panel { padding: 18px 20px 20px; }
.seatgrid { display: grid; grid-template-columns: 84px 1fr; gap: 8px 10px; align-items: center; margin: 6px 0 16px; }
.seatgrid .role { font-weight: 600; }
.seatgrid .role small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
/* 人数与开始方式（ADR-0027） */
.rolehead { display: flex; align-items: center; gap: 8px; margin: 12px 0 6px; }
.rolehead .grow { flex: 1; }
.rolein { display: grid; gap: 6px; }
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper .btn { width: 28px; height: 28px; padding: 0; font-size: 16px; }
.stepper b { min-width: 18px; text-align: center; }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; }
.lobbybox { margin: 0 0 16px; padding: 14px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line2); }
.lobbybox .row { display: flex; align-items: center; gap: 10px; }
.lobbybox .grow { flex: 1; }
.lobbybox .bar { height: 6px; border-radius: 3px; background: #eef0f4; margin: 10px 0 8px; overflow: hidden; }
.lobbybox .bar i { display: block; height: 100%; background: var(--act); transition: width .4s; }
.ticket.room { --ticket: var(--act); }
.ticket.vacant .role { color: var(--muted); }
details.more { margin: 4px 0 16px; }
details.more summary { cursor: pointer; color: var(--ink2); font-size: 13px; }
details.more[open] summary { margin-bottom: 10px; }
/* ── 席位票：唯一醒目的元素 ── */
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ticket { --notch: 9px; position: relative; display: grid; grid-template-columns: 1fr 132px; background: var(--surface); border-radius: 14px; filter: drop-shadow(0 1px 0 var(--line)) drop-shadow(0 6px 18px rgba(22, 25, 34, .08));
  -webkit-mask: radial-gradient(circle var(--notch) at calc(100% - 132px) 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--notch) at calc(100% - 132px) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle var(--notch) at calc(100% - 132px) 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--notch) at calc(100% - 132px) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat; }
.ticket .main { padding: 16px 18px 14px; min-width: 0; border-left: 8px solid var(--ticket); border-radius: 14px 0 0 14px; }
.ticket .role { font-size: 22px; font-weight: 700; line-height: 1.2; }
.ticket .name { color: var(--muted); font-size: 13px; }
.ticket .state { margin: 8px 0 12px; }
.ticket .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.ticket .stub { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; border-left: 2px dashed var(--line); }
.ticket .stub img { width: 104px; height: 104px; image-rendering: pixelated; }
.ticket .stub .seg button { height: 24px; padding: 0 8px; font-size: 12px; }
.ticket.off { opacity: .6; }
.ticket .url { margin-top: 10px; padding: 6px 8px; border-radius: 6px; background: #f4f5f8; font: 11px/1.4 ui-monospace, Consolas, monospace; color: var(--muted); word-break: break-all; max-height: 3.2em; overflow: hidden; }
.done-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 16px 20px; border-radius: var(--r); background: var(--ink); color: #fff; }
.done-head b { font-size: 18px; }
.done-head span { color: #b9bed0; }
.done-head .btn { background: transparent; color: #fff; border-color: #444a5c; }
.result { padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line2); }
.result .sum { font-size: 17px; font-weight: 650; }
.verify { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; }
.verify.no { color: var(--bad); }
/* ── 模板编辑器 ── */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.fieldset { padding: 18px 20px 6px; background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r); margin-bottom: 14px; }
.fieldset > .fh { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.fieldset > .fh b { font-size: 15px; }
.lock { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 400; }
.lock svg { width: 13px; height: 13px; }
.items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.item { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; padding: 12px; border: 1px solid var(--line2); border-radius: 10px; background: #fafbfc; }
.item.noimg { grid-template-columns: 1fr auto; }
.item .ops { display: flex; flex-direction: column; gap: 4px; }
.item .ops .btn { width: 30px; height: 30px; padding: 0; }
.item .ops svg { width: 15px; height: 15px; }
.item .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
.item label.f { margin-bottom: 8px; }
.imgfield { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.imgfield .thumb { position: relative; width: 92px; height: 92px; border-radius: 10px; background: #12131c; display: grid; place-items: center; overflow: hidden; cursor: pointer; border: 0; padding: 0; }
.imgfield .thumb img { width: 84%; height: 84%; object-fit: contain; }
.imgfield .thumb.photo img { width: 100%; height: 100%; object-fit: cover; }
.imgfield .thumb .mark { position: absolute; left: 4px; bottom: 4px; padding: 0 5px; border-radius: 4px; font-size: 10px; background: var(--warn-soft); color: var(--warn); }
.imgfield .links { display: flex; gap: 8px; font-size: 12px; }
.imgfield .links button { padding: 0; border: 0; background: none; color: var(--act); cursor: pointer; }
.imgfield .links button:disabled { color: var(--muted); cursor: default; }
.chips { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.chips .line { display: flex; gap: 6px; }
.savebar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 12px 0; background: linear-gradient(transparent, var(--canvas) 30%); }
/* ── 图片库 / 选择器 ── */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.mcard { position: relative; padding: 0; border: 1.5px solid var(--line2); border-radius: 10px; background: var(--surface); overflow: hidden; text-align: left; }
button.mcard { cursor: pointer; }
button.mcard:hover { border-color: var(--act); }
.mcard .im { aspect-ratio: 1; display: grid; place-items: center; background: #12131c; }
.mcard .im img { width: 100%; height: 100%; object-fit: cover; }
.mcard .im.builtin img { width: 78%; height: 78%; object-fit: contain; }
.mcard .cap { padding: 7px 9px; font-size: 12px; }
.mcard .cap b { display: block; font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 1; border: 1.5px dashed #b9bdc8; border-radius: 10px; background: transparent; color: var(--ink2); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--act); color: var(--act); background: var(--act-soft); }
.drop svg { width: 26px; height: 26px; }
.secret { margin: 10px 0; padding: 12px 14px; border-radius: 8px; background: #161922; color: #ffe38a; font: 13px/1.5 ui-monospace, Consolas, monospace; word-break: break-all; }
/* ── 市场 ── */
.market { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.market .tcard { cursor: default; }
.market .tcard .art { aspect-ratio: 16 / 8; }
.market .pub { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.market .foot { display: flex; align-items: center; gap: 8px; padding: 0 12px 12px; }
.price { font-weight: 650; }
.login .l { display: flex; flex-direction: column; justify-content: space-between; padding: 48px; background: var(--ink); color: #c9cdd8; overflow: hidden; }
.login .l h1 { margin: 0; color: #fff; font-size: 34px; line-height: 1.25; font-weight: 700; }
.login .l p { max-width: 26em; }
.login .l .deck { display: flex; gap: 12px; margin: 40px 0; }
.login .l .deck .ticket { width: 230px; grid-template-columns: 1fr 70px; --notch: 7px;
  -webkit-mask: radial-gradient(circle 7px at calc(100% - 70px) 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 7px at calc(100% - 70px) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 7px at calc(100% - 70px) 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 7px at calc(100% - 70px) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat; }
.login .l .deck .ticket:nth-child(2) { transform: translateY(18px) rotate(2deg); }
.login .l .deck .ticket .main { padding: 12px 14px; color: var(--ink); }
.login .l .deck .ticket .stub { padding: 8px; }
.login .l .deck .qr { width: 44px; height: 44px; border-radius: 4px; background: repeating-conic-gradient(var(--ink) 0 25%, #fff 0 50%) 0 0 / 11px 11px; }
@media (max-width: 1080px) {
  .compose, .editor { grid-template-columns: 1fr; }
  .side { position: static; }
}
@media (max-width: 760px) {
  .login .l { display: none; }
  .item { grid-template-columns: 1fr; }
}
/* 编辑器：简单字段两列排布；由游戏设定的字段收在一行 */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.grid2 > .wide { grid-column: 1 / -1; }
.fixed { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 0 14px; border-top: 1px solid var(--line2); color: var(--muted); font-size: 13px; }
.fixed b { color: var(--ink2); font-weight: 500; }
.fixed .lock { margin-right: 4px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; border: 1px solid rgba(0,0,0,.15); }
@media (max-width: 760px) {
  .grid2 { grid-template-columns: 1fr; }
}
/* ADR-0026：模板市场按游戏 */
a.tcard { color: inherit; text-decoration: none; }
.shots { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 8px; }
.shots img { height: 220px; border-radius: 10px; border: 1px solid var(--line, #e3e7e5); background: #f4f6f5; }
.tcard .price { font-weight: 650; }

/* 发布委托：费用明细 */
.bill { margin: 4px 0 12px; padding: 4px 16px; border-radius: var(--r); background: #f6f7fa; border: 1px solid var(--line2); }
.bill .ln { display: flex; align-items: flex-start; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.bill .ln:last-child { border-bottom: 0; }
.bill .ln > span:first-child { flex: 1; min-width: 0; }
.bill .ln > span small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.bill .ln.total { font-size: 16px; }
.bill .ln.total b { font-size: 22px; }
.bill .ln.total b small { font-size: 13px; font-weight: 400; color: var(--muted); }
.bill .ln.short { color: var(--bad); }
.bill .ln.short small { color: var(--bad); }
