:root {
  --bg: #fff6d9;
  --bg-2: #ffeaa3;
  --ink: #241f14;
  --muted: #7f7048;
  --brand: #f6b900;
  --brand-deep: #d98900;
  --accent: #ff7a1a;
  --card: rgba(255, 255, 255, .82);
  --line: rgba(124, 91, 12, .14);
  --shadow: 0 18px 50px rgba(141, 91, 10, .18);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 206, 56, .5), transparent 30%),
    radial-gradient(circle at 82% 16%, rgba(255, 141, 26, .18), transparent 28%),
    linear-gradient(180deg, #fff9e7, #fff1bf 46%, #fff8df);
}

button, input, textarea {
  font: inherit;
}

.phone-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 6px 10px 24px;
}

.hero {
  position: relative;
  min-height: 218px;
  overflow: hidden;
  border-radius: 0 0 22px 22px;
  padding: 14px;
  background: linear-gradient(140deg, rgba(255, 244, 185, .94), rgba(255, 203, 61, .86));
  box-shadow: var(--shadow);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255,255,255,.5), transparent 42%),
    url("data:image/svg+xml,%3Csvg width='390' height='290' viewBox='0 0 390 290' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d18a00' stroke-opacity='.17' stroke-width='2'%3E%3Cpath d='M41 213c50-89 111-104 172-48 49 45 90 38 127-20'/%3E%3Cpath d='M240 53c39 13 64 43 76 91'/%3E%3Cpath d='M79 76c28 23 66 28 112 14'/%3E%3C/g%3E%3Ccircle cx='314' cy='57' r='44' fill='%23fff' fill-opacity='.3'/%3E%3Ccircle cx='59' cy='246' r='58' fill='%23ff8a1a' fill-opacity='.12'/%3E%3C/svg%3E") center/cover;
  opacity: .9;
}

.brand-bar, .hero-copy, .hero-card { position: relative; z-index: 1; }
.brand-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-link {
  display: none;
  margin-left: auto;
  border: 1px solid rgba(151, 100, 0, .16);
  border-radius: 999px;
  padding: 8px 11px;
  color: #6b4700;
  background: rgba(255,255,255,.62);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: #3a2500;
  font-weight: 900;
  background: linear-gradient(145deg, #ffcd33, #ffa928);
  box-shadow: inset 0 -5px 12px rgba(127, 78, 0, .18), 0 8px 20px rgba(136, 84, 0, .16);
}
.brand-bar strong { display: block; font-size: 18px; }
.brand-bar span { color: var(--muted); font-size: 12px; }
.hero-copy { margin-top: 22px; }
.eyebrow {
  margin: 0 0 6px;
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}
h1, h2, p { margin-top: 0; }
.hero h1 {
  max-width: 12em;
  margin-bottom: 7px;
  font-size: 28px;
  line-height: 1.05;
}
.hero-copy > p:last-of-type {
  max-width: 25em;
  margin-bottom: 0;
  color: #5f4c21;
  font-weight: 700;
  font-size: 15px;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.badges span, .active-pill {
  border: 1px solid rgba(151, 100, 0, .13);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, .64);
  color: #6b4700;
  font-weight: 800;
  font-size: 12px;
}
.hero-card {
  margin-top: 14px;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 15px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(14px);
}
.hero-card b { display: block; margin-bottom: 3px; font-size: 16px; }
.hero-card span { color: var(--muted); font-size: 13px; }

.ticker-wrap { margin: 10px 0; display: grid; gap: 6px; overflow: hidden; }
.ticker {
  overflow: hidden;
  border-radius: 16px;
  background: #2a2110;
  color: #ffe58f;
  box-shadow: var(--shadow);
}
.ticker-soft {
  background: rgba(255,255,255,.72);
  color: #9a6100;
  box-shadow: none;
  border: 1px solid var(--line);
}
.ticker-track {
  display: inline-flex;
  min-width: 200%;
  gap: 38px;
  padding: 7px 0;
  white-space: nowrap;
  animation: marquee 24s linear infinite;
}
.ticker-soft .ticker-track { animation-duration: 31s; animation-direction: reverse; }
.ticker-track span { font-weight: 900; }
@keyframes marquee { to { transform: translateX(-50%); } }

.layout {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 9px;
}
.category-rail {
  display: grid;
  align-content: start;
  gap: 7px;
  position: sticky;
  top: 10px;
}
.cat-btn {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 9px 7px;
  background: rgba(255,255,255,.65);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(137, 86, 0, .08);
}
.cat-btn strong, .cat-btn span { display: block; }
.cat-btn strong { color: var(--ink); font-size: 14px; }
.cat-btn span { margin-top: 4px; font-size: 11px; }
.cat-btn.is-active {
  background: linear-gradient(145deg, #fff, #ffe28a);
  border-color: rgba(217, 137, 0, .32);
  transform: translateX(3px);
}
.content-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, .62);
  box-shadow: var(--shadow);
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 9px;
}
.section-head p {
  margin-bottom: 2px;
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 900;
}
.section-head h2 { margin: 0; font-size: 24px; }
.section-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.notice-stack {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}
.notice {
  border-radius: 12px;
  padding: 8px 10px;
  background: linear-gradient(90deg, rgba(255, 187, 42, .2), rgba(255,255,255,.55));
  color: #7b5200;
  font-size: 13px;
  font-weight: 800;
}
.item-list {
  display: grid;
  gap: 10px;
}
.group-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(217, 137, 0, .13);
  border-radius: 18px;
  padding: 13px;
  background: rgba(255,255,255,.78);
}
.group-item h3 {
  margin: 0 0 5px;
  font-size: 17px;
}
.group-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.hot-tag {
  display: inline-block;
  margin-left: 6px;
  border-radius: 999px;
  padding: 2px 6px;
  color: #fff;
  background: var(--accent);
  font-size: 11px;
}
.join-btn {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border-radius: 999px;
  padding: 0 15px;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  background: linear-gradient(145deg, #ff9c24, #e87700);
  box-shadow: 0 10px 20px rgba(232, 119, 0, .28);
}
.empty {
  border: 1px dashed rgba(141,91,10,.28);
  border-radius: 18px;
  padding: 24px 12px;
  color: var(--muted);
  text-align: center;
  background: rgba(255,255,255,.5);
}

.admin-body {
  background: linear-gradient(135deg, #fff9df, #ffedaf);
}
.admin-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 42px;
}
.admin-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  min-height: 190px;
  border-radius: 0 0 32px 32px;
  padding: 34px;
  background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(255,204,54,.75));
  box-shadow: var(--shadow);
}
.admin-hero p {
  margin-bottom: 8px;
  color: var(--brand-deep);
  font-weight: 900;
}
.admin-hero h1 { margin-bottom: 8px; font-size: 42px; }
.admin-hero span { color: var(--muted); font-weight: 700; }
.admin-hero a, .save-btn, .admin-login button, .ghost {
  border: 0;
  border-radius: 15px;
  padding: 13px 18px;
  color: #fff;
  background: linear-gradient(145deg, #ff9e22, #d97800);
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}
.admin-login, .editor-card {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow);
}
.admin-login {
  max-width: 680px;
}
.admin-login label, .editor-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}
.inline-row {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}
input, textarea {
  width: 100%;
  border: 1px solid rgba(141,91,10,.13);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  background: rgba(255,255,255,.76);
}
textarea { resize: vertical; }
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}
.is-hidden { display: none; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.editor-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.ghost {
  color: #8b5c00;
  background: rgba(255, 225, 134, .65);
}
.stack-editor, .category-editor {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.mini-row, .entry-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.danger {
  border: 1px solid rgba(216, 67, 21, .22);
  color: #c43911;
  background: #fff6ef;
}
.category-block {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,246,217,.55);
}
.entry-row {
  grid-template-columns: 1fr 1.3fr 1fr auto auto;
  margin-top: 10px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-weight: 900;
}
.check-row input { width: auto; }
.category-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}
.save-btn {
  width: 100%;
  margin-top: 18px;
  font-size: 18px;
}
.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.stat-cards div {
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}
.stat-cards b { display: block; font-size: 30px; }
.stat-cards span { color: var(--muted); font-weight: 900; font-size: 12px; }
.rank-list { display: grid; gap: 8px; margin-top: 14px; }
.rank-list p {
  display: flex;
  justify-content: space-between;
  margin: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 238, 177, .5);
}
.tips p { color: var(--muted); line-height: 1.7; }

@media (max-width: 760px) {
  .admin-grid, .form-grid, .category-top, .entry-row {
    grid-template-columns: 1fr;
  }
  .admin-hero {
    display: grid;
    align-items: start;
    padding: 24px;
  }
  .admin-hero h1 { font-size: 32px; }
  .inline-row { flex-direction: column; }
}
