:root { --ink: #151b2e; --paper: #f4f0e8; --paper-2: #ebe4d7; --line: #d7cfbf; --muted: #697084; --red: #ba3e3e; --red-dark: #8b2d34; --gold: #b8893b; --green: #2f7d65; --blue: #315c84; --shadow: 0 18px 40px rgba(26, 29, 41, .12); font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif; color: var(--ink); background: #dad7d0; }
* { box-sizing: border-box; } body { margin: 0; min-width: 320px; background: radial-gradient(circle at 10% 0%, #ece9e1, #d7d3ca 70%); } button, input, select { font: inherit; } button { cursor: pointer; } button:disabled { cursor: not-allowed; opacity: .46; }
.app-shell { width: min(100%, 1120px); min-height: 100vh; margin: 0 auto; padding: 20px 18px 54px; } .dm-shell { max-width: 1180px; } .player-shell { max-width: 760px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 8px 0 24px; } h1, h2, h3, p { margin: 0; } h1 { font-size: clamp(23px, 4vw, 36px); letter-spacing: .02em; } h2 { font-size: 20px; } h3 { font-size: 17px; line-height: 1.4; } .eyebrow { color: var(--red); font-size: 11px; letter-spacing: .16em; font-weight: 800; text-transform: uppercase; margin-bottom: 8px; } .muted { color: var(--muted); font-size: 13px; line-height: 1.6; }
.phase-pill, .event-status, .target-availability { border: 1px solid var(--line); background: rgba(255,255,255,.45); padding: 8px 11px; border-radius: 99px; color: var(--muted); font-size: 12px; white-space: nowrap; } .phase-pill.active { color: var(--red-dark); border-color: #e1a8a8; background: #f8e2df; } .phase-pill.selecting { color: #765620; border-color: #dbc38f; background: #f6eedb; } .phase-pill.final { color: var(--green); border-color: #9bc9b9; background: #dfefe8; }
.landing { min-height: 100vh; padding: 38px 18px; width: min(100%, 720px); margin: auto; } .landing-mark { display: inline-grid; place-items: center; border: 1px solid var(--ink); width: 52px; height: 52px; border-radius: 50%; font-weight: 900; font-size: 12px; margin-bottom: 54px; } .landing h1 { font-size: clamp(38px, 10vw, 78px); line-height: 1.02; margin-bottom: 20px; } .landing-copy { max-width: 490px; font-size: 16px; line-height: 1.8; color: #4e5667; } .home-panel { margin-top: 42px; background: rgba(250,248,243,.88); padding: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); } .panel-title { font-weight: 800; margin-bottom: 18px; } .home-panel > label { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 16px; font-weight: 700; } select, input { min-height: 42px; border: 1px solid var(--line); background: #fffdf8; color: var(--ink); padding: 8px 10px; border-radius: 8px; } .share-inputs { display: grid; gap: 8px; margin-bottom: 18px; } .share-input { display: grid; grid-template-columns: 1fr 86px 42px; gap: 8px; align-items: center; font-size: 14px; } .share-input small { color: var(--muted); font-weight: 400; margin-left: 5px; } .share-input em { color: var(--muted); font-size: 12px; font-style: normal; } .landing-foot { color: var(--muted); font-size: 12px; margin-top: 14px; }
.dm-hero, .player-hero { display: flex; justify-content: space-between; gap: 18px; align-items: end; background: var(--ink); color: #f8f5eb; padding: 22px; box-shadow: var(--shadow); } .player-hero { display: block; } .player-hero .countdown { margin-top: 22px; } .label, .hero-stats span { display: block; color: #aeb5c7; font-size: 11px; letter-spacing: .08em; margin-bottom: 7px; } .price-large { display: block; font-size: clamp(42px, 10vw, 68px); line-height: 1; letter-spacing: -.04em; } .hero-stats { display: flex; gap: 24px; margin-top: 20px; } .hero-stats strong { display: block; font-size: 20px; } .countdown { min-width: 116px; text-align: right; } .countdown span { display: block; font-size: 11px; color: #aeb5c7; margin-bottom: 3px; } .countdown strong { font-variant-numeric: tabular-nums; font-size: 28px; line-height: 1; } .countdown.static strong { font-size: 15px; white-space: nowrap; }
.dm-actions { display: flex; flex-wrap: wrap; gap: 9px; padding: 14px 0 20px; } .button { border: 1px solid var(--line); background: #fffdf8; color: var(--ink); padding: 11px 14px; border-radius: 7px; font-weight: 700; font-size: 13px; } .button:hover { transform: translateY(-1px); } .button.primary { background: var(--red); border-color: var(--red); color: white; } .button.secondary { background: #e5eee9; border-color: #b5d2c5; color: #24614f; } .button.danger { background: #f4dedb; border-color: #d69e9b; color: #8f2d34; } .button.wide { width: 100%; } .button.small { padding: 8px 10px; font-size: 12px; } .button-icon { margin-right: 6px; } .text-button { border: 0; background: transparent; color: var(--red-dark); padding: 3px 0; font-weight: 700; font-size: 12px; } .icon-button { border: 1px solid var(--line); background: #fffdf8; border-radius: 6px; padding: 7px 9px; font-size: 11px; color: var(--red-dark); }
.section { margin-top: 18px; background: rgba(250,248,243,.9); border: 1px solid var(--line); padding: 20px; box-shadow: 0 8px 20px rgba(26,29,41,.05); } .section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; } .section-count { color: var(--muted); font-size: 12px; } .player-table { display: grid; gap: 7px; } .player-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); background: #fffdf8; } .player-avatar, .hero-avatar { display: grid; place-items: center; border-radius: 50%; font-weight: 900; } .player-avatar { width: 34px; height: 34px; color: white; font-size: 13px; } .hero-avatar { width: 56px; height: 56px; color: white; font-size: 22px; } .rose { background: #b84d54; } .plum { background: #7f416a; } .gold { background: #b58738; } .teal { background: #34796b; } .sky { background: #4a789a; } .orange { background: #bf6639; } .violet { background: #655491; } .lime { background: #699052; } .player-main, .player-metrics { min-width: 0; } .player-main strong, .player-main span, .player-main small, .player-metrics b, .player-metrics small { display: block; } .player-main span { color: var(--muted); font-size: 12px; margin-top: 3px; } .player-main small, .player-metrics small { color: #8a8d96; font-size: 10px; margin-top: 3px; } .player-metrics { text-align: right; } .player-metrics b { font-size: 12px; color: var(--red-dark); } .dm-link-line { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; font-size: 11px; } .dm-link-line a { color: var(--blue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.target-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; } .target-strip span, .target-button { border: 1px solid #d9c58f; color: #765620; background: #fbf3df; border-radius: 7px; padding: 10px 15px; font-weight: 800; } .target-buttons { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; margin: 20px 0; } .target-button { font-size: 18px; min-height: 54px; }
.event-panel { border-color: #dbc38f; background: #fff9ec; } .event-prompt { line-height: 1.7; color: #56564e; margin-bottom: 18px; } .event-instructions { display: grid; gap: 8px; } .instruction-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid #e2d6b7; background: #fffdf8; padding: 10px; } .instruction-row.done { background: #e5f2eb; border-color: #add0bc; } .instruction-row.reported { background: #fbf3df; border-color: #d9c58f; } .instruction-row p { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 3px; } .done-mark, .waiting-mark { color: var(--green); font-size: 12px; font-weight: 800; white-space: nowrap; } .waiting-mark.neutral { color: var(--muted); } .event-footer { display: flex; justify-content: flex-end; padding-top: 15px; }
.player-shell .topbar { padding-bottom: 16px; } .identity { display: flex; align-items: center; gap: 13px; } .identity h2 { color: white; margin-bottom: 4px; } .identity p { color: #b6bbca; font-size: 12px; line-height: 1.5; max-width: 360px; } .nickname-line { display: flex; gap: 8px; align-items: center; margin-top: 15px; max-width: 310px; } .nickname-line input { min-height: 34px; flex: 1; background: #252c3f; border-color: #41495e; color: white; font-size: 12px; } .nickname-line input::placeholder { color: #aeb5c7; } .trade-heading { display: flex; justify-content: space-between; gap: 12px; align-items: start; } .price-chip { font-size: 17px; font-weight: 900; color: var(--red-dark); background: #f5e2dd; padding: 9px 11px; border-radius: 7px; white-space: nowrap; } .trade-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; } .trade-button { min-height: 102px; border: 0; color: white; border-radius: 8px; font-weight: 900; } .trade-button span, .trade-button small { display: block; } .trade-button span { font-size: 24px; } .trade-button small { margin-top: 8px; opacity: .85; font-size: 12px; } .trade-button.buy { background: #2c7965; } .trade-button.sell { background: #b34a4b; } .big-trade { border-top: 1px solid var(--line); padding-top: 17px; display: flex; justify-content: space-between; align-items: center; gap: 12px; } .big-trade strong, .big-trade span { display: block; } .big-trade span { color: var(--muted); font-size: 11px; margin-top: 4px; line-height: 1.4; } .big-buttons { display: flex; gap: 6px; } .big-buttons button { border: 1px solid var(--line); background: #fffdf8; color: var(--ink); border-radius: 6px; padding: 8px 9px; font-size: 11px; font-weight: 800; } .trade-note { color: var(--muted); font-size: 12px; line-height: 1.6; margin-top: 16px; }
.cards-section { padding-bottom: 18px; } .skill-card { border: 1px solid var(--line); background: #fffdf8; padding: 15px; position: relative; } .personal-card { border-color: #d4b5b5; background: #fff5f2; } .card-kicker { font-size: 10px; color: var(--red-dark); letter-spacing: .08em; margin-bottom: 9px; font-weight: 800; } .skill-card p { color: var(--muted); line-height: 1.6; font-size: 12px; margin: 8px 0 13px; } .card-state { color: var(--green); font-size: 12px; font-weight: 800; } .public-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 8px; } .public-card h3 { font-size: 14px; } .public-card .button { margin-top: 2px; }
.roster-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; } .roster-card { border: 1px solid var(--line); background: #fffdf8; padding: 10px; } .roster-card strong, .roster-card span, .roster-card b { display: block; } .roster-card strong { font-size: 13px; } .roster-card span { color: var(--muted); font-size: 10px; margin-top: 3px; } .roster-card b { color: var(--red-dark); margin-top: 8px; font-size: 12px; } .effects-bar { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; } .effects-bar span { border: 1px solid #d9c58f; background: #fbf3df; color: #765620; border-radius: 99px; padding: 6px 9px; font-size: 11px; }
.final-panel { background: #f7f5ef; } .final-price { color: var(--red-dark); font-weight: 900; font-size: 14px; } .ranking-list { display: grid; gap: 7px; } .ranking-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line); padding: 11px; background: #fffdf8; } .ranking-row.mine { border-color: #be7777; background: #fff0ed; } .rank-number { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: white; font-size: 13px; } .ranking-row div span, .ranking-row div strong { display: block; } .ranking-row div span { color: var(--muted); font-size: 11px; margin-top: 4px; } .shares-final { font-size: 12px; color: var(--red-dark); white-space: nowrap; } .ended-note { color: var(--green); font-size: 13px; font-weight: 800; padding: 11px 0; }
.dm-tools { display: flex; justify-content: space-between; gap: 12px; padding: 16px 0; color: var(--muted); font-size: 11px; } .dm-tools span { text-align: right; } .modal { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(13, 17, 30, .7); } .ad-box, .event-box { width: min(100%, 430px); background: #fbf7ed; padding: 28px 22px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.25); } .ad-box { background: var(--ink); color: white; min-height: 290px; display: flex; flex-direction: column; align-items: center; justify-content: center; } .ad-tag, .event-tag { display: inline-block; color: var(--gold); border: 1px solid currentColor; border-radius: 99px; padding: 5px 8px; font-size: 10px; letter-spacing: .08em; } .ad-box h2 { font-size: 32px; margin: 23px 0 7px; } .ad-box p { color: #c4c9d5; } .ad-box strong { font-size: 62px; line-height: 1; margin: 19px 0; color: #f0c86c; } .skip-ad { border: 1px solid #7a8090; color: #e5e7ed; background: transparent; padding: 7px 12px; border-radius: 5px; font-size: 11px; } .ad-box small { color: #8e95a6; font-size: 10px; margin-top: 10px; } .event-box { border-top: 6px solid var(--red); text-align: left; } .event-box h2 { margin: 17px 0 10px; } .event-box > p { color: var(--muted); line-height: 1.8; font-size: 13px; } .event-call { border: 1px solid var(--line); background: #fffdf8; padding: 12px; margin: 16px 0; font-size: 12px; line-height: 1.6; } .event-call strong { color: var(--red-dark); } .event-box .button { display: block; margin-top: 13px; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s; background: #151b2e; color: white; padding: 11px 14px; border-radius: 6px; font-size: 12px; max-width: calc(100vw - 36px); text-align: center; } .toast.show { opacity: 1; transform: translate(-50%, 0); } .is-jittering .trade-button { animation: jitter .4s infinite alternate; } @keyframes jitter { from { transform: translate(-3px, 2px) rotate(-1deg); } to { transform: translate(3px, -2px) rotate(1deg); } }
.landing { position: relative; isolation: isolate; width: 100%; max-width: none; overflow: hidden; color: white; }
.landing::before { content: ""; position: absolute; z-index: -2; inset: 0 0 auto; height: 560px; background: url("/ximen-boardroom.png") center 48% / cover no-repeat; }
.landing::after { content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 560px; background: rgba(11, 15, 25, .68); }
.landing > .eyebrow, .landing > h1, .landing > .landing-copy, .landing > .home-panel, .landing > .landing-foot { width: min(100%, 720px); margin-left: auto; margin-right: auto; }
.landing .landing-mark { margin-left: max(0px, calc((100% - 720px) / 2)); }
.landing .eyebrow { color: #f0c86c; }
.landing-copy { color: #e3e5ec; }
.landing .home-panel { color: var(--ink); margin-top: 128px; }
.landing .landing-foot { color: #535a6c; }
.dm-hero, .player-hero { position: relative; isolation: isolate; overflow: hidden; background: transparent; }
.dm-hero::before, .player-hero::before { content: ""; position: absolute; z-index: -2; inset: 0; background: url("/ximen-boardroom.png") center 56% / cover no-repeat; }
.dm-hero::after, .player-hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: rgba(15, 20, 35, .82); }
.ad-box { position: relative; }
.skip-ad { position: absolute; top: 14px; right: 14px; }
.ad-copy { animation: ad-punch .9s ease-out both; }
.ad-copy h2 { max-width: 340px; line-height: 1.12; }
.ad-copy p { max-width: 330px; line-height: 1.7; }
@keyframes ad-punch { from { opacity: 0; transform: scale(.88) rotate(-2deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
.choice-box { width: min(100%, 420px); max-height: min(80vh, 620px); overflow: auto; background: #fbf7ed; border-top: 6px solid var(--red); padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.choice-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.choice-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: #fffdf8; font-size: 22px; line-height: 1; }
.choice-list { display: grid; gap: 7px; }
.choice-list button { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: #fffdf8; color: var(--ink); padding: 12px; border-radius: 7px; }
.choice-list button:active { border-color: var(--red); background: #fff0ed; }
.choice-list strong, .choice-list span { display: block; }
.choice-list span { color: var(--muted); font-size: 11px; margin-top: 4px; }
@media (min-width: 760px) { .player-shell { padding-top: 34px; } .player-hero { padding: 28px; } .player-hero .countdown { float: right; margin-top: -26px; } .public-card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .app-shell { padding: 15px 12px 42px; } .dm-hero { align-items: flex-start; flex-direction: column; } .dm-hero .countdown { text-align: left; } .player-row { grid-template-columns: 32px minmax(0,1fr) auto; } .player-row .player-metrics { display: none; } .dm-link-line { grid-template-columns: 1fr auto; } .dm-link-line a { grid-column: 1 / -1; grid-row: 2; } .big-trade { align-items: flex-start; flex-direction: column; } .big-buttons { width: 100%; } .big-buttons button { flex: 1; } .target-buttons { grid-template-columns: repeat(4, 1fr); } .target-button { padding: 8px 4px; } .dm-tools { flex-direction: column; } .dm-tools span { text-align: left; } .public-card-grid { grid-template-columns: 1fr; } }

body:has(.player-shell) { overflow: hidden; background: #e8e4dc; }
.app-shell.player-shell { height: 100dvh; min-height: 0; max-width: 760px; padding: 10px 12px max(8px, env(safe-area-inset-bottom)); display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; gap: 8px; overflow: hidden; }
.player-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; }
.player-mini-id { display: flex; align-items: center; gap: 9px; min-width: 0; }
.player-mini-id .player-avatar { flex: 0 0 34px; }
.player-mini-id p { color: var(--muted); font-size: 10px; line-height: 1.2; }
.player-mini-id h1 { margin-top: 2px; font-size: 18px; line-height: 1.15; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-topbar .phase-pill { flex: 0 0 auto; padding: 6px 8px; font-size: 10px; }
.player-status-grid { display: grid; grid-template-columns: 1.35fr .8fr .8fr 1fr; gap: 1px; background: #394055; border: 1px solid #394055; box-shadow: var(--shadow); }
.player-status-grid > div { min-width: 0; background: var(--ink); color: white; padding: 10px 8px; }
.player-status-grid span, .player-status-grid strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-status-grid span { color: #aeb5c7; font-size: 9px; margin-bottom: 5px; }
.player-status-grid strong { font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.player-status-grid .status-price strong { color: #f1cb73; font-size: 17px; }
.player-shell .effects-bar { flex-wrap: nowrap; overflow-x: auto; margin: 0; padding-bottom: 1px; scrollbar-width: none; }
.player-shell .effects-bar::-webkit-scrollbar { display: none; }
.player-shell .effects-bar span { flex: 0 0 auto; }
.player-effects-slot { min-height: 0; overflow: hidden; }
.player-workspace { min-height: 0; overflow: hidden; }
.player-panel { height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.player-panel > .section { min-height: 100%; margin: 0; box-shadow: none; }
.player-panel-trade { overflow: hidden; }
.player-panel-trade > .trading-stage { display: flex; flex-direction: column; }
.player-panel .section { padding: 15px; }
.player-panel .section-heading { margin-bottom: 12px; }
.player-panel .trade-heading h2 { font-size: 16px; }
.player-panel .eyebrow { letter-spacing: 0; margin-bottom: 4px; }
.player-panel .trade-buttons { margin: 12px 0; }
.player-panel .trade-button { min-height: 84px; }
.player-panel .trade-button span { font-size: 21px; }
.player-panel .big-trade { padding-top: 11px; }
.player-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; min-height: 54px; padding-top: 4px; border-top: 1px solid var(--line); background: #e8e4dc; }
.player-tabs button { border: 0; background: transparent; color: var(--muted); border-radius: 6px; font-size: 11px; font-weight: 800; }
.player-tabs button span { display: block; height: 20px; font-size: 17px; line-height: 18px; }
.player-tabs button.active { background: var(--ink); color: white; }
.nickname-compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding-bottom: 13px; margin-bottom: 13px; border-bottom: 1px solid var(--line); }
.nickname-compact input { min-width: 0; min-height: 36px; }
.roster-card.mine { border-color: #be7777; background: #fff0ed; }
.trade-feed { min-height: 0; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.trade-feed-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #d24a4a; box-shadow: 0 0 0 4px rgba(210,74,74,.12); }
.trade-feed-list { display: grid; gap: 5px; }
.trade-feed-list > p { padding: 14px 0; color: var(--muted); font-size: 11px; text-align: center; }
.trade-feed-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; align-items: center; gap: 7px; min-height: 31px; padding: 6px 8px; border: 1px solid var(--line); background: #fffdf8; font-size: 11px; }
.trade-feed-item .trade-feed-arrow { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: white; font-weight: 900; }
.trade-feed-item.buy .trade-feed-arrow { background: var(--green); }
.trade-feed-item.sell .trade-feed-arrow { background: var(--red); }
.trade-feed-item > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trade-feed-item > span:not(.trade-feed-arrow), .trade-feed-item > small { color: var(--muted); }
.trade-feed-item > b { white-space: nowrap; }
.trade-feed-item.buy > b { color: var(--green); }
.trade-feed-item.sell > b { color: var(--red); }
.trade-feed-item.is-new { animation: feed-slide .45s ease-out both; }
@keyframes feed-slide { from { opacity: 0; transform: translateX(28px); background: #fff2cd; } to { opacity: 1; transform: translateX(0); background: #fffdf8; } }
.dm-trade-feed { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; margin: 0 0 18px; padding: 10px 12px; border: 1px solid var(--line); background: rgba(250,248,243,.9); overflow: hidden; }
.dm-trade-feed .trade-feed-head { margin: 0; white-space: nowrap; }
.dm-trade-feed .trade-feed-list { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.dm-trade-feed .trade-feed-list::-webkit-scrollbar { display: none; }
.dm-trade-feed .trade-feed-item { flex: 0 0 auto; grid-template-columns: 22px auto auto auto auto; }
.player-shell .modal { z-index: 20; }

@media (max-width: 560px) {
  .app-shell.player-shell { padding: 8px 8px max(6px, env(safe-area-inset-bottom)); }
  .player-panel .section { padding: 13px; }
  .player-panel .public-card-grid { grid-template-columns: 1fr; }
  .player-panel .big-trade { align-items: center; flex-direction: row; }
  .player-panel .big-buttons { width: auto; }
  .player-panel .big-buttons button { padding: 7px; }
  .trade-feed-item { grid-template-columns: 22px minmax(0, 1fr) auto auto; }
  .trade-feed-item > small { display: none; }
}

@media (max-height: 720px) {
  .app-shell.player-shell { gap: 5px; }
  .player-status-grid > div { padding: 7px 6px; }
  .player-panel .trade-button { min-height: 68px; }
  .player-panel .trade-buttons { margin: 8px 0; }
  .trade-feed-item:nth-child(n+4) { display: none; }
  .player-tabs { min-height: 48px; }
}

/* 角色立绘与拖拽技能 */
.portrait-avatar { display: block; object-fit: cover; object-position: 50% 12%; border: 2px solid rgba(255,255,255,.88); background: #ece5d9; }
.app-shell.player-shell { grid-template-rows: 178px auto minmax(0, 1fr) auto; }
.character-hero { position: relative; isolation: isolate; min-width: 0; height: 178px; overflow: hidden; color: white; background: #171d30; border: 1px solid #394055; box-shadow: var(--shadow); transition: .18s ease; }
.character-hero::before { content: ""; position: absolute; z-index: -2; inset: 0; background: linear-gradient(110deg, #131928 0 44%, #352127 100%); }
.character-hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(13,18,31,.96) 0%, rgba(13,18,31,.7) 43%, rgba(13,18,31,.08) 78%), linear-gradient(0deg, rgba(13,18,31,.92) 0 48px, transparent 49px); pointer-events: none; }
.character-portrait { position: absolute; z-index: -1; top: -35px; right: 4px; width: 176px; height: 264px; object-fit: contain; object-position: center top; filter: drop-shadow(0 12px 16px rgba(0,0,0,.28)); user-select: none; }
.character-hero .phase-pill { position: absolute; z-index: 2; top: 10px; right: 10px; color: #fff; border-color: rgba(255,255,255,.35); background: rgba(13,18,31,.68); }
.character-name { position: absolute; z-index: 2; left: 13px; top: 16px; width: 54%; }
.character-name small { display: block; color: #c8cedb; font-size: 10px; margin-bottom: 3px; }
.character-name h1 { color: white; font-size: 22px; line-height: 1.1; letter-spacing: 0; }
.character-stats { position: absolute; z-index: 2; inset: auto 0 0; height: 49px; display: grid; grid-template-columns: 1.3fr .72fr .72fr .9fr; align-items: center; background: rgba(12,17,29,.84); backdrop-filter: blur(5px); }
.character-stats > div { min-width: 0; padding: 0 8px; border-right: 1px solid rgba(255,255,255,.12); }
.character-stats > div:last-child { border-right: 0; }
.character-stats span, .character-stats strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.character-stats span { color: #aeb5c7; font-size: 8px; margin-bottom: 3px; }
.character-stats strong { color: white; font-size: 12px; font-variant-numeric: tabular-nums; }
.character-stats .stock strong { color: #f1cb73; font-size: 16px; }

.trade-button { position: relative; overflow: hidden; padding: 12px 8px 41px; }
.trade-button .trade-label { font-size: 23px; line-height: 1; }
.trade-participants { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex !important; align-items: center; justify-content: center; min-height: 27px; }
.trade-participant-avatar { width: 27px; height: 27px; margin-left: -6px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; border: 2px solid rgba(255,255,255,.88); background: #eee7db; box-shadow: 0 2px 7px rgba(0,0,0,.2); }
.trade-participant-avatar:first-child { margin-left: 0; }
.trade-participants em { color: rgba(255,255,255,.66); font-size: 9px; font-style: normal; font-weight: 600; }

.skill-heading { margin-bottom: 8px !important; }
.skill-drop-board { position: sticky; z-index: 5; top: -15px; margin: 0 -15px 10px; padding: 8px 15px 9px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(244,240,232,.97); backdrop-filter: blur(8px); }
.direction-drop-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 7px; }
.skill-direction-target { min-height: 48px; display: grid; align-content: center; padding: 7px 11px; color: white; border: 2px solid transparent; border-radius: 7px; transition: .18s ease; }
.skill-direction-target.buy { background: #2c7965; }
.skill-direction-target.sell { background: #b34a4b; }
.skill-direction-target strong, .skill-direction-target span { display: block; }
.skill-direction-target strong { font-size: 15px; }
.skill-direction-target span { margin-top: 2px; font-size: 8px; opacity: .76; }
.player-drop-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.skill-player-target { min-width: 0; min-height: 51px; display: grid; justify-items: center; align-content: center; gap: 2px; padding: 3px 2px; border: 1px solid var(--line); border-radius: 7px; background: #fffdf8; transition: .18s ease; }
.skill-target-portrait { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: #ece5d9; }
.skill-player-target span { display: block; width: 100%; overflow: hidden; color: var(--muted); font-size: 8px; font-weight: 800; text-align: center; text-overflow: ellipsis; white-space: nowrap; }

.cards-section .skill-card { overflow: hidden; border-radius: 8px; box-shadow: 0 8px 18px rgba(37,39,49,.08); }
.cards-section .skill-card + .public-card-grid { margin-top: 9px; }
.skill-card.is-draggable { border-color: #b99c67; background: #fffaf0; }
.skill-card.is-drag-source { opacity: .35; }
.skill-card.is-locked { filter: saturate(.7); }
.skill-guidance { display: block; min-height: 18px; color: var(--red-dark); font-size: 10px; line-height: 1.5; font-weight: 800; }
.drag-handle { width: calc(100% + 30px); min-height: 35px; margin: 10px -15px -15px; border: 0; border-top: 1px dashed #cdb887; background: #f1e5c8; color: #6f5126; font-size: 11px; font-weight: 900; cursor: grab; touch-action: none; user-select: none; }
.drag-handle:active { cursor: grabbing; }
.drag-handle span { margin-right: 5px; font-size: 17px; vertical-align: -1px; }
.skill-drag-ghost { position: fixed !important; z-index: 60; max-height: 190px; overflow: hidden; margin: 0 !important; pointer-events: none; transform: rotate(2deg) scale(.98); opacity: .94; box-shadow: 0 22px 45px rgba(15,18,28,.35) !important; }
.skill-drag-ghost .drag-handle { display: none; }
.skill-dragging { cursor: grabbing; user-select: none; }
.skill-dragging [data-drop-type] { transition: opacity .15s ease, transform .15s ease, outline-color .15s ease; }
.skill-dragging .is-invalid-target { opacity: .3; }
.skill-dragging .is-valid-target { outline: 2px dashed #f0c86c; outline-offset: -3px; transform: scale(.98); }
.skill-dragging .is-valid-target.is-drop-hover { outline-style: solid; outline-color: #fff0a8; transform: scale(1.03); box-shadow: 0 0 0 4px rgba(240,200,108,.22); }
.skill-dragging .character-hero.is-valid-target { outline-offset: -5px; }

.roster-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 8px; }
.roster-portrait { width: 42px; height: 54px; object-fit: contain; object-position: center bottom; background: #ece5d9; border-radius: 7px; }
.roster-card > div { min-width: 0; }
.roster-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 560px) {
  .app-shell.player-shell { grid-template-rows: 174px auto minmax(0, 1fr) auto; }
  .character-hero { height: 174px; }
  .character-portrait { top: -31px; right: -1px; width: 170px; height: 255px; }
  .skill-drop-board { margin-left: -13px; margin-right: -13px; padding-left: 13px; padding-right: 13px; }
}

@media (max-height: 720px) {
  .app-shell.player-shell { grid-template-rows: 145px auto minmax(0, 1fr) auto; }
  .character-hero { height: 145px; }
  .character-portrait { top: -39px; width: 153px; height: 230px; }
  .character-name { top: 11px; }
  .character-name h1 { font-size: 19px; }
  .character-stats { height: 43px; }
  .skill-player-target { min-height: 45px; }
  .skill-target-portrait { width: 27px; height: 27px; }
  .skill-drop-board { padding-top: 6px; padding-bottom: 6px; }
}
