:root{
  --polish-ink:#171412;
  --polish-muted:#64584d;
  --polish-line:rgba(50,38,28,.12);
  --polish-line-strong:rgba(50,38,28,.2);
  --polish-paper:rgba(255,252,247,.88);
  --polish-paper-strong:rgba(255,255,255,.96);
  --polish-warm:#b9814f;
  --polish-warm-deep:#7b4e2c;
  --polish-blue:#41606d;
  --polish-green:#0e715c;
  --polish-red:#aa2e24;
  --polish-radius:24px;
  --polish-shadow:0 24px 64px rgba(40,29,20,.13);
  --polish-shadow-soft:0 14px 34px rgba(40,29,20,.09);
}

body.ops-clean,
body.user-entry-page,
body.frontend-polish-reference{
  --card:var(--polish-paper);
  --surface:var(--polish-paper-strong);
  --line:var(--polish-line);
  --border:var(--polish-line);
  --text:var(--polish-ink);
  --muted:var(--polish-muted);
  --primary:#2a3039;
  --primary-dark:#151a22;
  --accent:var(--polish-warm);
  --radius:var(--polish-radius);
  --shadow:var(--polish-shadow);
}

body.ops-clean::before,
body.user-entry-page::before,
body.frontend-polish-reference::before{
  content:"";
  position:fixed;
  inset:-18% -10% auto;
  height:72vh;
  background:
    radial-gradient(circle at 16% 18%, rgba(255,255,255,.9), transparent 25%),
    radial-gradient(circle at 82% 8%, rgba(232,194,151,.3), transparent 28%),
    radial-gradient(circle at 52% 0%, rgba(126,151,164,.18), transparent 34%);
  filter:blur(30px) saturate(115%);
  pointer-events:none;
  z-index:0;
}

body.ops-clean::after,
body.user-entry-page::after,
body.frontend-polish-reference::after{
  content:"";
  position:fixed;
  inset:0;
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,0) 34%, rgba(255,255,255,.16) 62%, rgba(255,255,255,0)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 26px);
  pointer-events:none;
  z-index:0;
}

body.ops-clean > *,
body.user-entry-page > *,
body.frontend-polish-reference > *{
  position:relative;
  z-index:1;
}

body.ops-clean :is(.container,.wrap,.page,.shell,.main,.content,.panel,.card,section,.section,.toolbar,.filters,.hero,.stat-card,.summary-card,.config-card,.table-card,.form-card,.result-box,.empty-state),
body.user-entry-page :is(.page,.container,.entry-frame,.card,.hero,.panel,.notice,.agreement-card,.promo-card,.game-url-card,.status-card,.item-card,.points-ad-card,.modifier-entry,.preview-box,.result,.empty-state,.section),
body.frontend-polish-reference :is(.polish-hero,.polish-card){
  border-color:var(--polish-line);
  box-shadow:var(--polish-shadow-soft);
}

body.ops-clean :is(.hero,.page-hero,.topbar,.header,.toolbar):first-child,
body.user-entry-page :is(.hero,.title,.entry-banner,.entry-hero),
body.frontend-polish-reference .polish-hero{
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,248,238,.86) 52%, rgba(240,232,220,.74)),
    radial-gradient(circle at 86% 12%, rgba(185,129,79,.18), transparent 30%);
  border:1px solid rgba(255,255,255,.68);
  box-shadow:var(--polish-shadow);
  overflow:hidden;
}

body.ops-clean :is(.hero,.page-hero,.topbar,.header):first-child :is(h1,h2),
body.user-entry-page :is(.hero,.title,.entry-banner,.entry-hero) :is(h1,h2),
body.frontend-polish-reference h1{
  letter-spacing:-.055em;
  text-wrap:balance;
}

body.ops-clean :is(.hero,.page-hero,.topbar,.header):first-child :is(.note,.desc,.subtitle,p),
body.user-entry-page :is(.hero,.title,.entry-banner,.entry-hero) :is(.note,.desc,.subtitle,p),
body.frontend-polish-reference .polish-hero p{
  color:var(--polish-muted);
  max-width:760px;
}

body.ops-clean :is(button,.btn,.button,a.button,a.btn,input[type="button"],input[type="submit"]),
body.user-entry-page :is(button,.btn,.button,a.button,a.btn,input[type="button"],input[type="submit"]),
body.frontend-polish-reference button{
  border-radius:999px;
  font-weight:850;
  letter-spacing:-.015em;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, opacity .16s ease;
}

body.ops-clean :is(button,.btn,.button,a.button,a.btn,input[type="button"],input[type="submit"]):not(:disabled):hover,
body.user-entry-page :is(button,.btn,.button,a.button,a.btn,input[type="button"],input[type="submit"]):not(:disabled):hover,
body.frontend-polish-reference button:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 34px rgba(40,29,20,.14);
}

body.ops-clean :is(button.primary,.btn-primary,.primary),
body.user-entry-page :is(button.primary,.btn-primary,.primary),
body.frontend-polish-reference button{
  background:linear-gradient(135deg, #2f3742 0%, #171c24 100%);
  color:#fff;
  border-color:rgba(23,28,36,.08);
}

body.ops-clean :is(input,select,textarea),
body.user-entry-page :is(input,select,textarea){
  border-color:var(--polish-line);
  background:rgba(255,255,255,.9);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72);
}

body.ops-clean :is(input,select,textarea):focus,
body.user-entry-page :is(input,select,textarea):focus{
  outline:none;
  border-color:rgba(65,96,109,.48);
  box-shadow:0 0 0 4px rgba(65,96,109,.12), inset 0 1px 0 rgba(255,255,255,.72);
}

body.ops-clean :is(table),
body.user-entry-page :is(table){
  border-collapse:separate;
  border-spacing:0;
}

body.ops-clean :is(th),
body.user-entry-page :is(th){
  background:linear-gradient(180deg, rgba(255,255,255,.94), rgba(246,241,235,.9));
  color:#2a3039;
}

body.ops-clean :is(.pill,.badge,.tag,.chip),
body.user-entry-page :is(.pill,.badge,.tag,.chip){
  border-radius:999px;
  border-color:rgba(185,129,79,.22);
  background:rgba(185,129,79,.1);
  color:var(--polish-warm-deep);
}

body.ops-clean :is(.result,.result-box,.notice,.alert,.message,.status),
body.user-entry-page :is(.result,.result-box,.notice,.alert,.message,.status){
  border-radius:18px;
}

body.ops-clean :is(.success,.ok),
body.user-entry-page :is(.success,.ok){
  background:#edf8f4;
  border-color:#cceade;
  color:#0e5f4d;
}

body.ops-clean :is(.error,.danger),
body.user-entry-page :is(.error,.danger){
  background:#fff1ef;
  border-color:#f1c8c2;
  color:#96271f;
}

body.ops-clean :is(.warn,.warning),
body.user-entry-page :is(.warn,.warning){
  background:#fff7e8;
  border-color:#ecd2a7;
  color:#7b4e2c;
}

body.user-entry-page .entry-frame,
body.user-entry-page .page,
body.user-entry-page .container{
  width:min(100%, 1180px);
  margin-inline:auto;
}

body.ops-clean .container,
body.ops-clean .wrap,
body.ops-clean main,
body.ops-clean .page{
  width:min(100% - 28px, 1240px);
}

body.frontend-polish-reference{
  margin:0;
  min-height:100vh;
  font-family:"SF Pro Display","PingFang SC","Microsoft YaHei",sans-serif;
  color:var(--polish-ink);
  background:linear-gradient(180deg,#f6efe7,#e9e0d5 56%,#e7ebef);
}

.polish-shell{ width:min(1120px, calc(100% - 32px)); margin:0 auto; padding:34px 0 56px; }
.polish-hero{ display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:22px; align-items:stretch; padding:30px; border-radius:32px; }
.polish-kicker{ display:inline-flex; margin-bottom:10px; color:var(--polish-warm-deep); font-size:12px; font-weight:900; letter-spacing:.14em; }
.polish-hero h1{ margin:0; font-size:clamp(32px,5vw,58px); line-height:.98; }
.polish-hero p{ margin:16px 0 0; font-size:16px; line-height:1.8; }
.polish-hero-card{ display:grid; gap:10px; align-content:center; padding:20px; border-radius:24px; background:rgba(255,255,255,.68); border:1px solid var(--polish-line); }
.polish-hero-card strong{ font-size:18px; }
.polish-hero-card span{ padding:10px 12px; border-radius:16px; background:rgba(185,129,79,.1); color:var(--polish-warm-deep); font-weight:800; }
.polish-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-top:16px; }
.polish-card{ padding:22px; border:1px solid var(--polish-line); border-radius:26px; background:var(--polish-paper); }
.polish-card h2{ margin:0 0 8px; }
.polish-card p{ margin:0 0 16px; color:var(--polish-muted); line-height:1.7; }
.polish-card-primary{ background:linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,246,235,.9)); }
.polish-card button{ min-height:42px; padding:0 18px; border:0; cursor:pointer; }

@media (max-width: 820px){
  .polish-hero{ grid-template-columns:1fr; padding:22px; }
  .polish-grid{ grid-template-columns:1fr; }
}

/* HTML polish hooks: shared structural classes for per-page refinement. */
body.ops-clean :is(.polish-page-shell,.polish-workspace){
  display:grid;
  gap:16px;
}

body.ops-clean .polish-page-shell > :first-child,
body.user-entry-page .polish-page-shell > :first-child{
  margin-top:0;
}

body.ops-clean :is(.polish-hero-layout,.polish-panel-grid,.polish-action-grid,.polish-summary-grid),
body.user-entry-page :is(.polish-hero-layout,.polish-panel-grid,.polish-action-grid,.polish-summary-grid){
  display:grid;
  gap:16px;
}

body.ops-clean .polish-hero-layout,
body.user-entry-page .polish-hero-layout{
  grid-template-columns:minmax(0,1.45fr) minmax(260px,.75fr);
  align-items:stretch;
}

body.ops-clean .polish-panel-grid,
body.user-entry-page .polish-panel-grid{
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
}

body.ops-clean .polish-action-grid,
body.user-entry-page .polish-action-grid{
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
}

body.ops-clean :is(.polish-hero-copy,.polish-hero-aside,.polish-section,.polish-panel,.polish-action-panel),
body.user-entry-page :is(.polish-hero-copy,.polish-hero-aside,.polish-section,.polish-panel,.polish-action-panel){
  border:1px solid var(--polish-line);
  border-radius:24px;
  background:rgba(255,255,255,.62);
  box-shadow:var(--polish-shadow-soft);
}

body.ops-clean .polish-hero-copy,
body.user-entry-page .polish-hero-copy{
  padding:24px;
}

body.ops-clean .polish-hero-aside,
body.user-entry-page .polish-hero-aside{
  padding:18px;
  display:grid;
  align-content:center;
  gap:10px;
  background:linear-gradient(145deg, rgba(255,255,255,.72), rgba(255,246,235,.78));
}

body.ops-clean :is(.polish-section,.polish-panel,.polish-action-panel),
body.user-entry-page :is(.polish-section,.polish-panel,.polish-action-panel){
  padding:18px;
}

body.ops-clean :is(.polish-kicker,.polish-section-label),
body.user-entry-page :is(.polish-kicker,.polish-section-label){
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:26px;
  margin-bottom:8px;
  padding:5px 10px;
  border:1px solid rgba(185,129,79,.2);
  border-radius:999px;
  background:rgba(185,129,79,.09);
  color:var(--polish-warm-deep);
  font-size:11px;
  font-weight:900;
  letter-spacing:.1em;
  text-transform:uppercase;
}

body.ops-clean .polish-lede,
body.user-entry-page .polish-lede{
  color:var(--polish-muted);
  font-size:14px;
  line-height:1.85;
}

body.ops-clean .polish-toolbar,
body.user-entry-page .polish-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
}

body.ops-clean .polish-toolbar > :is(button,.btn,.button,a.button,a.btn),
body.user-entry-page .polish-toolbar > :is(button,.btn,.button,a.button,a.btn){
  min-height:38px;
}

body.ops-clean :is(.polish-risk,.polish-warning),
body.user-entry-page :is(.polish-risk,.polish-warning){
  border-color:#ecd2a7;
  background:linear-gradient(145deg, rgba(255,251,242,.94), rgba(255,244,223,.86));
}

body.ops-clean :is(.polish-result,.polish-output),
body.user-entry-page :is(.polish-result,.polish-output){
  border-color:rgba(65,96,109,.18);
  background:linear-gradient(145deg, rgba(255,255,255,.92), rgba(239,246,248,.74));
}

@media (max-width: 860px){
  body.ops-clean .polish-hero-layout,
  body.user-entry-page .polish-hero-layout{
    grid-template-columns:1fr;
  }
}
