/* Reward centre inherits Gakupo's light navigation and blue-grey surfaces. */
#view-rewards {
  --reward-ui-font:"PingFang SC","Microsoft YaHei","Noto Sans CJK SC","Noto Sans SC","Source Han Sans SC",system-ui,sans-serif;
  font-family:var(--reward-ui-font);
  font-synthesis:none;
}
:root { --gakupo-tier-R:#5485d6; --gakupo-tier-SR:#996ac1; --gakupo-tier-SSR:#d0a139; --gakupo-tier-base:#98a7b8; --gakupo-tier-negative:#bd7061; --gakupo-tier-missing:#cbd3df; --gakupo-tier-R-ink:#416c83; --gakupo-tier-SR-ink:#77548e; --gakupo-tier-SSR-ink:#81602b; --gakupo-tier-R-paper:#e7f2f7; --gakupo-tier-SR-paper:#f1ebf6; --gakupo-tier-SSR-paper:#fbf1d5; }
[data-score-tier="R"] { --score-mark:var(--gakupo-tier-R); --score-ink:var(--gakupo-tier-R-ink); --score-paper:var(--gakupo-tier-R-paper); }
[data-score-tier="SR"] { --score-mark:var(--gakupo-tier-SR); --score-ink:var(--gakupo-tier-SR-ink); --score-paper:var(--gakupo-tier-SR-paper); }
[data-score-tier="SSR"] { --score-mark:var(--gakupo-tier-SSR); --score-ink:var(--gakupo-tier-SSR-ink); --score-paper:var(--gakupo-tier-SSR-paper); }
[data-score-tier="base"] { --score-mark:var(--gakupo-tier-base); --score-ink:#65788e; --score-paper:#f0f3f7; }
[data-score-tier="negative"] { --score-mark:var(--gakupo-tier-negative); --score-ink:#a45143; --score-paper:#f9eeea; }
[data-score-tier="missing"] { --score-mark:var(--gakupo-tier-missing); --score-ink:#77879a; --score-paper:#f6f7f9; }
.score-tier-badge { display:inline-flex; align-items:center; justify-content:center; gap:4px; padding:3px 7px; border:0; border-radius:5px; background:var(--score-paper); color:var(--score-ink); font:inherit; font-size:11px; font-weight:600; white-space:nowrap; }
button.score-tier-badge { cursor:pointer; }
.score-tier-editor { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:18px 0; }
.score-tier-editor label { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:8px; font-size:12px; color:#64748b; }
.score-tier-editor label .score-tier-badge { grid-column:1/-1; justify-self:start; }
.score-tier-editor input { min-width:0; width:100%; }
@media(max-width:600px) { .score-tier-editor { grid-template-columns:1fr; } .score-tier-editor label { grid-template-columns:50px auto minmax(0,1fr) auto; } .score-tier-editor label .score-tier-badge { grid-column:auto; } }
#view-rewards { width:100%; max-width:none; margin:0; gap:0; padding:0; height:100%; min-height:0; }
#view-rewards h1,#view-rewards h2,#view-rewards h3,#view-rewards p { margin:0; }
.reward-sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
#rewardToolbar { display:none !important; }
.reward-top-tabs {
  display:flex; align-items:center; gap:2px; height:36px; padding:3px;
  border-radius:999px;
  background:rgba(241, 245, 251, 0.75);
  backdrop-filter:blur(20px) saturate(180%);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  border:1px solid rgba(255, 255, 255, 0.8);
  box-shadow:inset 0 1px 1px rgba(255, 255, 255, 0.95), 0 1px 3px rgba(30, 40, 60, 0.04);
}
.reward-top-tabs button {
  height:30px; padding:0 14px; border:0; border-radius:999px; font:inherit; font-size:13px; font-weight:500;
  white-space:nowrap; background:transparent; color:#5a6d87; cursor:pointer;
  transition:all 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.reward-top-tabs button.active {
  color:#2563eb;
  background:rgba(255, 255, 255, 0.95);
  font-weight:600;
  box-shadow:inset 0 1px 1px #ffffff, 0 2px 6px rgba(37, 99, 235, 0.14), 0 1px 2px rgba(0, 0, 0, 0.04);
}
.reward-top-tabs button:not(.active):hover {
  color:#1e40af;
  background:rgba(255, 255, 255, 0.65);
}
.reward-period-trigger {
  display:inline-flex; align-items:center; gap:6px; height:34px; padding:0 13px;
  border-radius:999px;
  background:rgba(255, 255, 255, 0.75);
  backdrop-filter:blur(20px) saturate(180%);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  border:1px solid rgba(255, 255, 255, 0.8);
  box-shadow:inset 0 1px 1px rgba(255, 255, 255, 0.95), inset 0 -1px 1px rgba(0, 0, 0, 0.03), 0 2px 6px rgba(0, 0, 0, 0.03);
  color:#334155; font:inherit; font-size:12.5px; font-weight:500; white-space:nowrap; cursor:pointer;
  transition:all 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.reward-period-trigger:hover {
  background:rgba(255, 255, 255, 0.92);
  border-color:rgba(255, 255, 255, 0.95);
  color:#2563eb;
  transform:translateY(-1px);
  box-shadow:inset 0 1px 1.5px #ffffff, 0 3px 10px rgba(37, 99, 235, 0.12);
}
.reward-period-trigger .reward-period-icon { color:#64748b; flex-shrink:0; }
.reward-period-trigger .reward-period-caret { font-size:11px; color:#94a3b8; margin-left:1px; }

/* ================= 管理模式工作区顶部单行控制栏 (Apple HIG 胶囊化) ================= */
#view-rewards.reward-manage-view.active { display:flex; flex-direction:column; padding:12px 16px 20px; box-sizing:border-box; overflow:hidden; }
.reward-manage-bar {
  display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:48px; padding:6px 14px;
  background:rgba(255, 255, 255, 0.78);
  backdrop-filter:blur(24px) saturate(190%);
  -webkit-backdrop-filter:blur(24px) saturate(190%);
  border:1px solid rgba(255, 255, 255, 0.85);
  border-radius:14px;
  box-shadow:inset 0 1px 1.5px rgba(255, 255, 255, 0.95), 0 2px 8px rgba(0, 0, 0, 0.03);
  margin-bottom:12px; flex-shrink:0;
}
.reward-manage-left { display:flex; align-items:center; gap:12px; min-width:0; flex-wrap:nowrap; }
.reward-manage-right { display:flex; align-items:center; gap:8px; flex-shrink:0; }

.reward-student-pill {
  position:relative; display:inline-flex; align-items:center; height:34px; border-radius:999px;
  background:rgba(255, 255, 255, 0.75);
  backdrop-filter:blur(20px) saturate(180%);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  border:1px solid rgba(255, 255, 255, 0.8);
  box-shadow:inset 0 1px 1px rgba(255, 255, 255, 0.95), inset 0 -1px 1px rgba(0, 0, 0, 0.03), 0 2px 6px rgba(0, 0, 0, 0.03);
  cursor:pointer; box-sizing:border-box;
  transition:all 160ms cubic-bezier(0.16, 1, 0.3, 1);
  outline:none !important;
}
.reward-student-pill:hover {
  background:rgba(255, 255, 255, 0.92);
  border-color:rgba(255, 255, 255, 0.95);
  box-shadow:inset 0 1px 1.5px #ffffff, 0 3px 10px rgba(0, 0, 0, 0.06);
}
.reward-student-pill:focus-within {
  background:#ffffff;
  border-color:#93c5fd;
  box-shadow:inset 0 1px 1.5px #ffffff, 0 0 0 3px rgba(37, 99, 235, 0.14), 0 3px 10px rgba(37, 99, 235, 0.08);
}
.reward-pill-icon { position:absolute; left:11px; top:50%; transform:translateY(-50%); color:#64748b; display:inline-flex; align-items:center; pointer-events:none; z-index:1; }
.reward-pill-arrow { position:absolute; right:11px; top:50%; transform:translateY(-50%); color:#94a3b8; display:inline-flex; align-items:center; pointer-events:none; z-index:1; }
.reward-pill-select { position:relative; z-index:0; width:100%; height:100%; appearance:none !important; -webkit-appearance:none !important; -moz-appearance:none !important; border:none !important; border-radius:999px !important; background:transparent !important; background-color:transparent !important; background-image:none !important; color:#1e293b; font-size:13px; font-weight:600; cursor:pointer; outline:none !important; box-shadow:none !important; padding:0 26px 0 32px; margin:0; font-family:inherit; box-sizing:border-box; }
.reward-pill-select::-ms-expand { display:none; }
.gakupo-navigation select.reward-pill-select,.gakupo-navigation select.reward-pill-select:hover,.gakupo-navigation select.reward-pill-select:focus,.gakupo-navigation select.reward-pill-select:focus-visible,#view-rewards select.reward-pill-select,#view-rewards select.reward-pill-select:hover,#view-rewards select.reward-pill-select:focus,#view-rewards select.reward-pill-select:focus-visible { outline:none !important; outline-offset:0 !important; box-shadow:none !important; border:none !important; background:transparent !important; background-color:transparent !important; background-image:none !important; }

.reward-account-chips { display:flex; align-items:center; gap:8px; }
.reward-chip { display:inline-flex; align-items:center; gap:4px; height:32px; padding:0 10px; border-radius:8px; font-size:12px; white-space:nowrap; }
.reward-chip-balance { background:rgba(37,99,235,.07); border:1px solid rgba(37,99,235,.16); color:#1d4ed8; }
.reward-chip-sub { font-size:11px; opacity:.85; }
.reward-chip-balance strong { font-size:15px; font-weight:700; font-variant-numeric:tabular-nums; margin:0 1px; }
.reward-chip-balance small { font-size:11px; }
.reward-chip-earned { background:#f8fafc; border:1px solid #e2e8f0; color:#475569; }
.reward-chip-muted { font-size:11px; color:#94a3b8; }

.reward-pill-toggle { display:inline-flex; align-items:center; gap:6px; height:32px; padding:0 12px; border-radius:999px; background:#f1f5f9; border:1px solid #e2e8f0; color:#475569; font-size:12.5px; font-weight:500; cursor:pointer; transition:all 140ms ease; user-select:none; }
.reward-pill-toggle:hover { background:#e2e8f0; }
.reward-pill-toggle.is-active { background:rgba(37,99,235,.1); border-color:rgba(37,99,235,.25); color:#1d4ed8; font-weight:600; }
.reward-pill-toggle input { accent-color:#2563eb; cursor:pointer; width:14px; height:14px; margin:0; }

.reward-pill-btn { display:inline-flex; align-items:center; gap:6px; height:32px; padding:0 14px; border-radius:999px; background:#ffffff; border:1px solid #d1d5db; color:#374151; font-size:12.5px; font-weight:600; cursor:pointer; box-shadow:0 1px 2px rgba(0,0,0,.03); transition:all 140ms ease; }
.reward-pill-btn:hover { border-color:#2563eb; color:#2563eb; transform:translateY(-1px); box-shadow:0 2px 6px rgba(37,99,235,.12); }
.reward-pill-btn svg { color:currentColor; }
.reward-draw-layout { display:grid; grid-template-columns:minmax(0,1fr) clamp(240px,21vw,290px); gap:16px; height:100%; min-height:0; }
.reward-stage-panel { --reward-accent:#3568b5; --reward-footer-height:128px; --reward-actions-width:220px; display:grid; grid-template-rows:44px minmax(0,1fr) var(--reward-footer-height); min-width:0; min-height:0; padding:12px 20px 0; border-radius:12px; background:#fff; border:1px solid #d6e0ed; }
.reward-stage-panel[data-tier="SR"] { --reward-accent:#8158aa; }
.reward-stage-panel[data-tier="SSR"] { --reward-accent:#ad752b; }
.reward-stage-toolbar { display:flex; align-items:center; justify-content:space-between; min-width:0; gap:12px; }
.reward-stage-tag { font-size:12px; color:#647894; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reward-mode-tabs { display:flex; align-items:center; gap:3px; padding:3px; border-radius:8px; background:#f0f3f8; }
.reward-mode-tabs button { min-height:36px; padding:6px 13px; border:0; border-radius:6px; font:inherit; font-size:13px; white-space:nowrap; background:transparent; color:#586c86; cursor:pointer; }
.reward-mode-tabs button.active { background:#fff; color:#294f80; font-weight:600; box-shadow:0 1px 3px rgba(32,55,86,.14); }
.reward-stage { container-type:size; position:relative; width:100%; min-width:0; min-height:0; display:grid; place-items:center; overflow:clip; }
.reward-wheel-wrap { position:relative; width:min(100%,calc(100dvh - 252px)); max-height:100%; aspect-ratio:1; }
@supports(width:1cqw) { .reward-wheel-wrap { width:min(96cqw,96cqh); } }
#rewardWheel { display:block; width:100%; height:100%; filter:drop-shadow(0 6px 10px rgba(37,57,86,.12)); }
.reward-wheel-pointer { position:absolute; z-index:2; top:0; left:50%; transform:translateX(-50%); width:0; height:0; border-left:14px solid transparent; border-right:14px solid transparent; border-top:30px solid var(--reward-accent); }
.reward-wheel-avatar { position:absolute; width:19%; height:19%; left:40.5%; top:40.5%; object-fit:cover; border-radius:50%; background:#fff; border:5px solid #fff; box-shadow:0 2px 6px rgba(37,57,86,.12); }
.reward-stage-footer { display:grid; grid-template-columns:minmax(0,1fr) var(--reward-actions-width); align-items:center; gap:20px; height:var(--reward-footer-height); min-height:0; box-sizing:border-box; padding:14px 0; border-top:1px solid #e4eaf3; }
.reward-reveal { display:grid; grid-template-rows:18px minmax(0,1fr) 18px; align-items:center; gap:2px; height:100%; min-width:0; min-height:0; overflow:hidden; color:#586f8c; font-size:12px; line-height:18px; overflow-wrap:anywhere; }
.reward-reveal > span { grid-row:1; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.reward-reveal > span:last-child:not(:first-child) { grid-row:3; }
.reward-reveal strong { grid-row:2; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; max-height:60px; font-size:28px; line-height:30px; font-weight:600; color:var(--reward-accent); }
.reward-reveal .reward-idle-title { font-size:21px; color:#344e71; }
.reward-stage-footer > .btn-action-primary { flex:0 0 auto; min-width:210px; min-height:50px; justify-content:center; font-size:16px; border-radius:9px; }
.reward-control-panel { display:flex; flex-direction:column; gap:18px; min-width:0; min-height:0; padding:20px; background:#edf2f9; border-radius:10px; }
.reward-student-controls { display:flex; flex-direction:column; gap:12px; min-width:0; margin:0; padding:0; border:0; }
.reward-student,.reward-pool-controls label,.reward-period label,.reward-editor-fields label,.reward-editor-row label { display:flex; flex-direction:column; gap:7px; min-width:0; color:#52667f; font-size:12px; }
.reward-student-controls .field-input,.reward-pool-controls .field-input,.reward-period .field-input { width:100%; min-width:0; max-width:100%; height:42px; padding:6px 9px; border:1px solid #cbd8e9; border-radius:6px; background:#fff; color:#304661; font:inherit; font-size:14px; }
.reward-balance { display:flex; flex-direction:column; gap:3px; color:#5a708d; font-size:11px; }
.reward-balance > div { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.reward-balance > div > span { font-size:12px; }
.reward-balance strong { font-size:36px; line-height:1.2; color:#2d5d9e; font-weight:600; font-variant-numeric:tabular-nums; }
.reward-balance small { font-size:13px; font-weight:400; }
.reward-pool-controls { display:flex; flex-direction:column; gap:8px; border-top:1px solid #d5dfed; padding-top:16px; }
.reward-note { font-size:11px; line-height:1.8; color:#5e738e; }
.reward-shortfall { font-size:11px; line-height:1.8; color:#876024; }
.reward-prize-preview { display:flex; flex-direction:column; gap:8px; min-height:0; }
.reward-preview-heading { display:flex; align-items:center; justify-content:space-between; color:#637994; font-size:11px; }
.reward-preview-heading h2 { color:#3e5675; font-size:13px; font-weight:600; }
.reward-prize-list { list-style:none; margin:0; padding:0; }
.reward-prize-list li { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:7px 0; border-bottom:1px solid #d7e1ee; color:#3d5471; font-size:12px; line-height:1.6; }
.reward-prize-list small { color:#536f93; white-space:nowrap; }
.reward-prize-preview .reward-prize-list li > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reward-prize-preview > .btn-action { justify-content:center; min-height:36px; font-size:12px; background:transparent; }
.reward-period-summary { display:flex; flex-direction:column; gap:4px; margin-top:auto; padding:14px 0 0; border:0; border-top:1px solid #d5dfed; background:transparent; color:#607792; font:inherit; font-size:11px; text-align:left; cursor:pointer; }
.reward-period-summary strong { font-size:11px; font-weight:500; color:#3e587b; line-height:1.7; }
.reward-period-summary:hover strong { color:#285fae; }
.reward-picks { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:repeat(2,minmax(0,1fr)); gap:18px; width:min(90%,760px); height:85%; max-height:100%; perspective:1000px; }
@supports(width:1cqw) { .reward-picks { width:min(90cqw,138cqh,880px); height:min(88cqh,65cqw); } }
.reward-pick { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; min-width:0; min-height:0; padding:16px 10px; border:1px solid #b7cbe5; border-radius:12px; background:#e3eeff; color:#345a8d; font:inherit; font-size:14px; cursor:pointer; transform-style:preserve-3d; transition:background-color 180ms ease,transform 180ms ease; }
.reward-pick > .ui-icon { width:clamp(36px,10cqh,76px); height:clamp(36px,10cqh,76px); }
.reward-pick:not(:disabled):hover { transform:translateY(-3px); background:#d2e4ff; }
.reward-cards .reward-pick { background:#344f75; color:#fff; border-color:#456690; }
.reward-cards .reward-pick:not(:disabled):hover { background:#456690; }
.reward-card-mark { font-size:clamp(34px,10cqh,70px); font-weight:600; line-height:1; }
.reward-pick.is-opening { animation:reward-box-open 360ms ease-in-out 6; }
.reward-pick.is-flipping { animation:reward-card-flip 650ms ease-in-out 3; }
#view-rewards .reward-pick:disabled { opacity:1; }
.reward-pick.is-revealed { background:#fff1d7; color:#725013; border-color:#dbc08b; }
.reward-pick.is-revealed strong { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; max-width:100%; font-size:clamp(14px,3cqw,26px); font-weight:600; line-height:1.7; overflow-wrap:anywhere; }
.reward-reel { display:flex; flex-direction:column; align-items:center; justify-content:center; width:min(90%,850px); height:72%; min-width:0; min-height:0; padding:24px; border:1px solid #c0d0e6; border-radius:16px; background:#edf4ff; gap:24px; }
.reward-reel > span { color:#526f95; font-size:14px; }
.reward-reel strong { width:100%; flex:1; min-height:0; display:grid; place-items:center; padding:16px; background:#fff; border-radius:10px; box-shadow:inset 0 2px 6px rgba(37,57,86,.08); text-align:center; color:#345a8d; font-size:clamp(26px,4cqw,56px); line-height:1.5; overflow-wrap:anywhere; }
.reward-reel i { width:38px; height:4px; border-radius:3px; background:#9db4d5; }
#view-rewards.reward-manage-view.active { display:grid; grid-template-rows:auto minmax(0,1fr); gap:16px; }
.reward-student-controls.is-inline { display:flex; flex-direction:row; align-items:center; gap:24px; padding:12px 18px; border:1px solid #d5dfec; border-radius:9px; background:#fff; }
.reward-student-controls.is-inline .reward-student { width:210px; }
.reward-student-controls.is-inline .reward-balance { min-width:180px; }
.reward-content { display:flex; flex-direction:column; min-height:0; overflow:auto; gap:16px; }
.reward-section-bar { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.reward-section-bar h2 { font-size:17px; font-weight:600; color:#2a405d; }
.reward-section-bar p { margin-top:5px !important; font-size:12px; color:#65768d; line-height:1.7; }
.reward-section-bar > button { flex-shrink:0; }
.reward-period { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px; margin-bottom:16px; }
.reward-period label { flex:1 1 150px; }
.reward-period-dialog .reward-note + .reward-note { margin-top:12px; }
.reward-shop-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.reward-item { display:flex; flex-direction:column; gap:14px; min-width:0; padding:22px; border:1px solid #d5dfec; border-radius:10px; background:#fff; }
.reward-item-category { color:#536f93; font-size:11px; }
.reward-item h3 { color:#2e4768; font-weight:600; font-size:17px; line-height:1.6; overflow-wrap:anywhere; }
.reward-item p { min-height:40px; font-size:12px; line-height:1.8; color:#60748f; overflow-wrap:anywhere; }
.reward-item > div { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:auto; color:#60748f; font-size:12px; }
.reward-item strong { font-size:23px; font-weight:600; color:#345c94; font-variant-numeric:tabular-nums; }
.reward-item small { font-size:12px; font-weight:400; }
.reward-goal progress { width:100%; height:7px; border:0; border-radius:4px; background:#e5edf7; accent-color:#6b93c7; }
.reward-goal progress::-webkit-progress-bar { background:#e5edf7; border-radius:4px; }
.reward-goal progress::-webkit-progress-value { background:#6b93c7; border-radius:4px; }
.reward-history-filter { display:flex; align-items:center; gap:6px; font-size:12px; color:#566c87; }
.reward-history-scroll { overflow:auto; background:#fff; border:1px solid rgba(0,0,0,0.07); border-radius:12px; box-shadow:0 1px 3px rgba(0,0,0,0.02); }
.reward-history-table { min-width:740px; width:100%; border-collapse:separate; border-spacing:0; }
.reward-history-table th { padding:10px 14px; font-size:12.5px; font-weight:600; color:#475569; background:#f8fafc; border-bottom:1px solid #e2e8f0; }
.reward-history-table td { padding:12px 14px; font-size:13px; color:#1e293b; border-bottom:1px solid #f1f5f9; }
.reward-history-table tr:last-child td { border-bottom:0; }
.reward-history-table small { display:block; color:#94a3b8; font-size:11px; margin-top:3px; }
.reward-history-table th { background:#eaf0f8; color:#3c5472; }
.reward-history-table td { font-size:12px; vertical-align:top; line-height:1.7; }
.reward-history-table td:last-child { min-width:110px; }
.reward-history-table .paper-link { display:block; padding:2px 0; }
.reward-empty { padding:36px 24px; background:#fff; border:1px solid #d5dfec; border-radius:10px; color:#60748f; font-size:13px; line-height:1.9; }
.reward-empty h2 { color:#2e4768; font-size:18px; margin-bottom:10px !important; }
.reward-settings-dialog .dialog-panel { display:block; }
.reward-editor-fields { display:grid; grid-template-columns:2fr 1fr 1fr; gap:14px; margin-bottom:16px; }
.reward-editor-list { display:flex; flex-direction:column; margin:14px 0 18px; }
.reward-editor-row { display:grid; grid-template-columns:minmax(0,1fr) 100px 34px; gap:10px; align-items:end; padding:12px 0; border-bottom:1px solid #e2e8f1; }
.reward-editor-row:has(.reward-editor-description) { grid-template-columns:minmax(0,1fr) 90px minmax(0,1.2fr) 34px; }
.reward-settings-dialog .field-input { width:100%; min-width:0; padding:6px 9px; }
.reward-remove { width:34px; height:36px; border:0; border-radius:5px; background:#f8eeee; color:#9e5c5c; cursor:pointer; display:grid; place-items:center; }
.reward-remove:hover { background:#f4dddd; }
#view-rewards button:disabled { opacity:.5; cursor:default; transform:none; }

#rewardTopTabs button:focus-visible,.reward-period-trigger:focus-visible,#view-rewards button:focus-visible,#view-rewards select:focus-visible,#view-rewards input:focus-visible,.reward-settings-dialog input:focus-visible,.reward-settings-dialog select:focus-visible,.reward-remove:focus-visible { outline:2px solid #3568b5; outline-offset:2px; }
@keyframes reward-box-open { 0%,100% {transform:rotate(0);} 25% {transform:rotate(-5deg) translateY(-3px);} 75% {transform:rotate(5deg) translateY(-3px);} }
@keyframes reward-card-flip { 0%,100% {transform:rotateY(0);} 50% {transform:rotateY(180deg);} }
@media(min-width:721px) {
    .gakupo-navigation[data-page="rewards"] .content-area { min-height:0; overflow:hidden; padding:12px; }
    .reward-history-scroll { min-height:0; }
}
@media(min-width:721px) and (max-height:800px) {
    .reward-control-panel { gap:12px; padding:16px; }
    .reward-student-controls { gap:8px; }
    .reward-balance strong { font-size:30px; }
    .reward-pool-controls { padding-top:12px; }
    .reward-prize-preview .reward-prize-list li:nth-child(n+4) { display:none; }
    .reward-stage-panel { --reward-footer-height:112px; }
    .reward-stage-footer { padding:12px 0; }
    .reward-reveal { grid-template-rows:16px minmax(0,1fr) 16px; font-size:11px; line-height:16px; }
    .reward-reveal strong { font-size:24px; line-height:26px; max-height:52px; }
    .reward-reveal .reward-idle-title { font-size:19px; }
}
@media(min-width:721px) and (max-width:1180px) {
    .reward-draw-layout { grid-template-columns:minmax(0,1fr) 236px; gap:12px; }
    .reward-stage-panel { --reward-actions-width:186px; padding:10px 14px 0; }
    .reward-stage-tag { display:none; }
    .reward-mode-tabs { width:100%; justify-content:space-between; }
    .reward-mode-tabs button { padding:6px 10px; font-size:12px; }
    .reward-stage-footer { gap:14px; }
    .reward-stage-footer > .btn-action-primary { min-width:175px; min-height:46px; font-size:14px; }
    .reward-control-panel { padding:16px; }
    .reward-top-tabs button { padding:0 11px; font-size:12px; }
    .reward-shop-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:720px) {
    #view-rewards { height:auto; min-height:100%; padding:0 0 16px; }
    .reward-manage-bar { flex-direction:column; align-items:stretch; height:auto; min-height:auto; padding:10px; gap:10px; }
    .reward-manage-left { flex-wrap:wrap; gap:8px; }
    .reward-manage-right { justify-content:flex-end; }
    .reward-draw-layout { display:flex; flex-direction:column; height:auto; gap:12px; }
    .reward-stage-panel { --reward-footer-height:160px; order:1; height:calc(100dvh - 310px); min-height:430px; padding:10px 12px 0; }
    .reward-control-panel { order:0; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; padding:12px; }
    .reward-control-panel .reward-student-controls { gap:8px; }
    .reward-balance strong { font-size:24px; }
    .reward-balance > div { gap:4px; }
    .reward-balance > div > span { font-size:10px; }
    .reward-balance > span { font-size:10px; }
    .reward-pool-controls { padding:0; border:0; gap:8px; }
    .reward-control-panel .field-input { font-size:12px; height:38px; }
    .reward-prize-preview { grid-column:1 / -1; }
    .reward-preview-heading,.reward-prize-preview .reward-prize-list,.reward-period-summary { display:none; }
    .reward-prize-preview > .btn-action { min-height:30px; font-size:11px; }
    .reward-mode-tabs { width:100%; gap:0; }
    .reward-mode-tabs button { flex:1; min-height:36px; padding:5px 6px; font-size:11px; }
    .reward-stage-tag { display:none; }
    .reward-stage-footer { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) 36px; align-items:stretch; gap:8px; padding:12px 0; }
    .reward-reveal { grid-template-rows:16px minmax(0,1fr) 16px; line-height:16px; text-align:center; }
    .reward-reveal strong { font-size:22px; line-height:24px; max-height:48px; }
    .reward-reveal .reward-idle-title { font-size:17px; }
    .reward-stage-footer > .btn-action-primary { min-height:44px; font-size:14px; }
    .reward-picks { gap:10px; }
    .reward-pick { gap:8px; padding:10px 4px; font-size:10px; }
    .reward-reel { padding:14px; gap:12px; }
    .reward-reel > span { font-size:11px; }
    .reward-top-tabs button { padding:0 10px; font-size:12px; }
    .reward-period-trigger { height:36px; padding:0 9px; }
    .reward-period-trigger > span { display:none; }
    #view-rewards.reward-manage-view.active { display:flex; gap:12px; }
    .reward-student-controls.is-inline { gap:14px; padding:12px; }
    .reward-student-controls.is-inline .reward-student { width:auto; flex:1; }
    .reward-student-controls.is-inline .reward-balance { min-width:110px; }
    .reward-content { overflow:visible; }
    .reward-section-bar { align-items:flex-start; }
    .reward-section-bar h2 { font-size:15px; }
    .reward-section-bar p { font-size:11px; }
    .reward-section-bar > button { padding:6px 9px; font-size:11px; }
    .reward-shop-grid { grid-template-columns:1fr; }
    .reward-editor-fields { grid-template-columns:1fr 1fr; }
    .reward-editor-fields > label:first-child { grid-column:1 / -1; }
    .reward-editor-row,.reward-editor-row:has(.reward-editor-description) { grid-template-columns:minmax(0,1fr) 75px 30px; }
    .reward-editor-description { grid-column:1 / 3; grid-row:2; }
    .reward-editor-row .reward-remove { grid-column:3; grid-row:1; }
    .reward-settings-dialog .dialog-footer { flex-wrap:wrap; }
}
@media(prefers-reduced-motion:reduce) {
    .reward-pick,#rewardWheel { animation:none !important; transition:none !important; }
}

.reward-project-caption { display:none; }
.reward-project-caption small { font-size:14px; font-weight:500; }
@media (max-width:720px) {
  #view-rewards .reward-stage-panel { grid-template-rows:auto minmax(0,1fr) var(--reward-footer-height); }
  #view-rewards .reward-stage-toolbar { display:grid; grid-template-columns:minmax(0,1fr); gap:6px; }
  #view-rewards .reward-mode-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); width:auto; }
  #view-rewards .reward-mode-tabs button { padding-inline:2px; }
}
