﻿.mall-modal {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
}
.mall-modal-inner {
  background: var(--panel);
  border: 4px solid var(--panel-bd);
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 rgba(74,50,32,.18), 0 1.5px 0 var(--wood-lt);
  padding: 32px 28px 28px 28px;
  min-width: 340px;
  max-width: 98vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mall-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mall-close-btn {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
  transition: background .18s;
}
.mall-close-btn:hover {
  background: #c0492c;
}
.mall-modal-body {
  width: 100%;
  margin-top: 12px;
}
.mall-modal-backdrop {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.18);
  z-index: -1;
}
@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=M+PLUS+Rounded+1c:wght@400;500;700;800&display=swap");

/* reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sky-top:   #b3e5fc;
  --sky-bot:   #e1f5fe;
  --grass:     #6abf69;
  --grass-dk:  #4caf50;
  --ground:    #f1e9d2;
  --ground-dk: #e8dcc0;
  --wood:      #c8a96e;
  --wood-dk:   #a07840;
  --wood-lt:   #eeddb5;
  --panel:     #fdf5e0;
  --panel-bd:  #c8a96e;
  --ink:       #4a3220;
  --ink-soft:  #7a5c40;
  --brand:     #e05c3a;
  --accent:    #4caf50;
  --gold:      #f6c84b;
  --white:     #fff;
  --shadow:    rgba(74,50,32,.22);
}

html { scroll-behavior: smooth; }

body {
  font-family: "M PLUS Rounded 1c", sans-serif;
  color: var(--ink);
  background: var(--sky-top);
  overflow-x: hidden;
}

.is-hidden { display: none !important; }

.app-shell { position: relative; z-index: 2; }

.auth-gate {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 12px;
}

.auth-card {
  width: min(520px, 96vw);
}

.auth-hint {
  text-align: center;
  font-weight: 800;
  color: var(--ink-soft);
  background: var(--wood-lt);
  border: 2px dashed var(--wood);
  border-radius: 12px;
  padding: 10px 12px;
}

.hint-link-btn {
  border: none;
  background: transparent;
  color: var(--brand);
  font-family: inherit;
  font-size: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
}

.hint-link-btn:hover {
  color: #c0492c;
}

.auth-message {
  min-height: 24px;
  text-align: center;
  font-weight: 800;
  color: var(--ink-soft);
}

.auth-message.good { color: var(--accent); }

.auth-message.bad { color: var(--brand); }

.auth-deco {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.auth-deco-img {
  object-fit: contain;
  filter: drop-shadow(0 3px 7px rgba(0,0,0,.18));
  animation: bob 3s ease-in-out infinite;
}

.auth-deco-img.a1 { width: 62px; animation-delay: 0s; }
.auth-deco-img.a2 { width: 74px; animation-delay: .4s; }
.auth-deco-img.a3 { width: 84px; animation-delay: .8s; }

.quick-admin-trigger {
  cursor: pointer;
  transition: transform .15s, filter .15s;
}

.quick-admin-trigger:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 5px 10px rgba(0,0,0,.24));
}

/* sky */
.sky {
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bot) 100%);
  pointer-events: none;
}

.cloud {
  position: absolute; background: #fff; border-radius: 999px; opacity: .88;
  animation: drift linear infinite;
}
.cloud::before, .cloud::after { content:""; position:absolute; background:#fff; border-radius:999px; }
.c1 { width:160px;height:44px;top:8%;left:-160px;animation-duration:42s;animation-delay:0s; }
.c1::before { width:80px;height:64px;top:-30px;left:18px; }
.c1::after  { width:60px;height:52px;top:-20px;left:60px; }
.c2 { width:220px;height:54px;top:22%;left:-220px;animation-duration:54s;animation-delay:8s; }
.c2::before { width:100px;height:78px;top:-38px;left:24px; }
.c2::after  { width:80px;height:62px;top:-26px;left:80px; }
.c3 { width:130px;height:38px;top:38%;left:-130px;animation-duration:36s;animation-delay:18s; }
.c3::before { width:64px;height:52px;top:-26px;left:14px; }
.c3::after  { width:50px;height:42px;top:-18px;left:46px; }
@keyframes drift { from{transform:translateX(0)} to{transform:translateX(calc(100vw + 260px))} }

.star {
  position:absolute; font-size:1rem; color:var(--gold);
  text-shadow:0 0 8px rgba(255,200,60,.7);
  animation:twinkle 2.4s ease-in-out infinite; pointer-events:none;
}
.s1{top:14%;left:62%;animation-delay:0s}
.s2{top:28%;left:80%;animation-delay:.6s}
.s3{top:10%;left:88%;animation-delay:1.2s}
.s4{top:35%;left:44%;animation-delay:1.8s}
@keyframes twinkle {
  0%,100%{opacity:.8;transform:scale(1)}
  50%    {opacity:.3;transform:scale(.7)}
}

/* hero */
.hero { position:relative;z-index:2;min-height:320px;display:flex;flex-direction:column; }

.hero-inner {
  flex:1; display:grid; grid-template-columns:1fr auto;
  align-items:flex-end; gap:16px;
  max-width:1100px; margin:0 auto; width:100%; padding:40px 24px 0;
}

.hero-eyebrow {
  font-size:.78rem; letter-spacing:.18em; text-transform:uppercase;
  color:#fff8d3; background:linear-gradient(135deg,#a15b24,#d88532);
  border-radius:999px; padding:4px 12px; display:inline-block;
  border:2px solid #f7d17f;
  font-weight:800; margin-bottom:10px; box-shadow:0 3px 0 rgba(0,0,0,.2);
}

.hero-title {
  font-family:"Baloo 2",cursive; font-size:clamp(2.2rem,5vw,3.8rem);
  line-height:1.1; color:#fff6d2;
  text-shadow:0 2px 0 #875328,0 4px 0 #6d3f1f,0 10px 20px rgba(0,0,0,.22);
  margin-bottom:10px;
}
.hero-title span {
  font-size:clamp(1rem,2.4vw,1.6rem);
  display:block;
  color:#ffe9b3;
  letter-spacing:.08em;
  text-shadow:0 2px 0 rgba(0,0,0,.16);
}

.hero-sub {
  color:rgba(255,255,255,.92); font-size:1rem;
  max-width:420px; line-height:1.6; text-shadow:0 1px 4px rgba(0,0,0,.18);
}

.hero-chars { display:flex;align-items:flex-end;gap:0;padding-bottom:0; }

.char { filter:drop-shadow(0 6px 12px rgba(0,0,0,.22));animation:bob 3s ease-in-out infinite; }
.char-a{width:100px;animation-delay:0s}
.char-b{width:180px;animation-delay:.5s}
.char-c{width:90px;animation-delay:1s}

@keyframes bob {
  0%,100%{transform:translateY(0)}
  50%    {transform:translateY(-8px)}
}

/* grass strip */
.grass-strip {
  height:48px;
  background:
    radial-gradient(ellipse 18px 30px at 10px  100%,var(--grass) 100%,transparent 100%),
    radial-gradient(ellipse 16px 26px at 38px  100%,var(--grass) 100%,transparent 100%),
    radial-gradient(ellipse 20px 34px at 66px  100%,var(--grass) 100%,transparent 100%),
    radial-gradient(ellipse 14px 24px at 90px  100%,var(--grass) 100%,transparent 100%),
    radial-gradient(ellipse 18px 30px at 116px 100%,var(--grass) 100%,transparent 100%),
    radial-gradient(ellipse 16px 28px at 144px 100%,var(--grass) 100%,transparent 100%),
    radial-gradient(ellipse 20px 32px at 170px 100%,var(--grass) 100%,transparent 100%),
    radial-gradient(ellipse 15px 26px at 196px 100%,var(--grass) 100%,transparent 100%),
    radial-gradient(ellipse 18px 30px at 224px 100%,var(--grass) 100%,transparent 100%),
    radial-gradient(ellipse 17px 28px at 252px 100%,var(--grass) 100%,transparent 100%),
    radial-gradient(ellipse 20px 34px at 278px 100%,var(--grass) 100%,transparent 100%),
    radial-gradient(ellipse 16px 26px at 306px 100%,var(--grass) 100%,transparent 100%),
    radial-gradient(ellipse 18px 30px at 332px 100%,var(--grass) 100%,transparent 100%),
    radial-gradient(ellipse 14px 24px at 358px 100%,var(--grass) 100%,transparent 100%),
    linear-gradient(180deg,transparent 40%,var(--grass) 40%);
  background-size:368px 48px;
  background-repeat:repeat-x;
  margin-top:auto;
}

/* ground */
.ground {
  position:relative; z-index:2;
  background:
    repeating-linear-gradient(90deg, transparent 0,transparent 119px,rgba(0,0,0,.025) 119px,rgba(0,0,0,.025) 120px),
    repeating-linear-gradient(180deg,transparent 0,transparent 39px, rgba(0,0,0,.025) 39px, rgba(0,0,0,.025) 40px),
    var(--ground);
  min-height:100vh; padding-bottom:90px;
}

.page { max-width:1100px;margin:0 auto;padding:28px 16px; }

/* status bar */
.status-bar {
  display:flex; flex-wrap:wrap; align-items:center; gap:10px;
  background:var(--wood-lt); border:3px solid var(--wood);
  border-radius:16px; padding:12px 16px; margin-bottom:22px;
  box-shadow:0 4px 0 var(--wood-dk),0 8px 16px var(--shadow);
}

.status-label { font-weight:800;font-size:.9rem; }

.player-name {
  display: inline-flex;
  align-items: center;
  min-width: 108px;
  padding: 6px 12px;
  border: 2px solid var(--wood);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-family: "Baloo 2", cursive;
  font-size: .96rem;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1;
}

.status-points {
  display:inline-flex;align-items:center;gap:4px;
  background:var(--gold);border:2px solid #d4a832;
  border-radius:999px;padding:0 14px;box-shadow:0 3px 0 #c49020;
  height:36px;
}
.pts-icon{font-size:.95rem}
.pts-num { font-family:"Baloo 2",cursive;font-size:1rem;font-weight:800;line-height:1;color:var(--ink); }
.pts-label{font-size:.85rem;font-weight:700}

.status-counts{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.count-chip {
  background:var(--white);border:2px solid var(--wood);
  border-radius:999px;padding:0 13px;font-size:.87rem;font-weight:700;
  height:36px;display:inline-flex;align-items:center;
}

.chip-btn {
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}

.chip-btn:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
}

.chip-btn:active {
  transform: translateY(1px);
}

.nav-active {
  background: var(--wood-lt) !important;
  border-color: var(--brand) !important;
  box-shadow: 0 2px 8px rgba(224,92,58,.22);
  color: var(--brand);
}

.status-player{display:flex;align-items:center;gap:8px}

.status-msg{font-size:.88rem;font-weight:700;min-width:60px}
.status-msg.good{color:var(--accent)}
.status-msg.bad {color:var(--brand)}

/* layout */
.page-views { display:grid;gap:16px; }
.stack  { display:grid;gap:16px; }
.view-panel { display:grid;gap:16px; }

/* sign board cards */
.sign-board {
  border-radius:16px;overflow:hidden;
  box-shadow:0 6px 0 var(--wood-dk),0 10px 20px var(--shadow);
  border:3px solid var(--wood-dk);
  width: 100%;
  }

.mall-focus {
  box-shadow: 0 0 0 4px rgba(246,200,75,.55), 0 6px 0 var(--wood-dk), 0 10px 20px var(--shadow);
}

.sign-header {
  background:linear-gradient(135deg,var(--wood) 0%,var(--wood-dk) 100%);
  color:var(--white);text-shadow:0 1px 3px rgba(0,0,0,.3);
  font-family:"Baloo 2",cursive;font-size:1.06rem;font-weight:800;
  padding:8px 16px;letter-spacing:.04em;border-bottom:2px solid var(--wood-dk);
  display:flex;align-items:center;gap:8px;
}

.hd-icon {
  width:36px;height:36px;object-fit:contain;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.25));
  flex-shrink:0;
}

.sign-body { background:var(--panel);padding:14px; }

/* form */
.field-label { display:grid;gap:5px;font-size:.88rem;font-weight:700;color:var(--ink-soft); }

input, textarea, select {
  font-family:inherit;font-size:.92rem;
  border:2px solid var(--panel-bd);border-radius:10px;
  padding:8px 10px;background:var(--white);color:var(--ink);transition:border-color .15s;
}
input:focus, textarea:focus, select:focus {
  outline:none;border-color:var(--brand);box-shadow:0 0 0 3px rgba(224,92,58,.15);
}
textarea{resize:vertical;min-height:64px}

.quest-toolbar {
  display:grid;
  grid-template-columns:repeat(3,minmax(130px,1fr));
  gap:8px;
  margin-bottom:10px;
}

.sign-subtitle {
  font-weight: 800;
  color: var(--wood-dk);
  margin-top: 10px;
}

.quest-admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quest-refresh-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 8px;
}

.quest-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .86rem;
  color: var(--ink-soft);
}

.quest-category-nav {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.quest-cat-tab {
  position:relative;
  border:2px solid var(--wood-dk);
  background:linear-gradient(180deg,#70452e 0%, #523322 100%);
  color:#ffe7a3;
  border-radius:10px;
  min-width:102px;
  height:44px;
  padding:6px 30px 6px 10px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
  box-shadow:0 3px 0 #3e2418;
}

.quest-cat-tab .tab-label {
  font-weight:800;
  font-size:.86rem;
}

.quest-cat-tab .tab-icon {
  font-size:.9rem;
}

.quest-cat-tab .tab-remain {
  position:absolute;
  right:6px;
  top:4px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  background:#f3981a;
  color:#fff;
  font-size:.72rem;
  font-weight:800;
  line-height:18px;
  text-align:center;
}

.quest-cat-tab.active {
  background:linear-gradient(180deg,#f39a2c 0%, #d97706 100%);
  color:#fff9e8;
  border-color:#f3c278;
}

.deadline-left {
  font-size:.9rem;
  font-weight:800;
  color:#a65918;
  background:#fff0db;
  border:1px solid #f2c28b;
  border-radius:8px;
  padding:4px 8px;
  width:max-content;
}

.deadline-left.is-overdue {
  color:#fff;
  background:#d95a3f;
  border-color:#b84831;
}

/* buttons */
.btn-wood {
  font-family:"Baloo 2",cursive;font-weight:800;border-radius:999px;
  border:none;cursor:pointer;padding:9px 18px;font-size:.95rem;
  letter-spacing:.04em;transition:transform .15s,box-shadow .15s;
  text-shadow:0 1px 2px rgba(0,0,0,.25);
}
.btn-wood:hover  { transform:translateY(-2px); }
.btn-wood:active { transform:translateY(2px);box-shadow:none!important; }

.btn-brand {
  background:linear-gradient(135deg,#f47a5a,var(--brand));
  color:#fff;box-shadow:0 4px 0 #a83020;
}
.btn-brand:hover { box-shadow:0 6px 0 #a83020,0 8px 14px rgba(0,0,0,.18); }

.btn-accent {
  background:linear-gradient(135deg,#76c442,var(--accent));
  color:#fff;box-shadow:0 4px 0 #2d7a30;
}
.btn-accent:hover { box-shadow:0 6px 0 #2d7a30,0 8px 14px rgba(0,0,0,.18); }

.btn-sm { padding:0 14px;font-size:.86rem;height:36px;display:inline-flex;align-items:center; }

.btn-logout {
  background: linear-gradient(135deg, #d6cfbf, #b9af99);
  color: #fff;
  box-shadow: 0 4px 0 #948a73;
}

.btn-logout:hover {
  box-shadow: 0 6px 0 #948a73, 0 8px 14px rgba(0,0,0,.18);
}

.btn-ghost {
  background: linear-gradient(135deg, #d6cfbf, #b9af99);
  color: #fff;
  box-shadow: 0 4px 0 #948a73;
}

/* items */
.list{display:grid;gap:10px}

.item {
  background:var(--white);border:2px solid var(--panel-bd);
  border-radius:12px;padding:11px 12px;
  display:grid;gap:6px;box-shadow:0 3px 0 var(--ground-dk);
  animation:pop-in .3s ease both;
}

@keyframes pop-in {
  from{opacity:0;transform:scale(.95) translateY(4px)}
  to  {opacity:1;transform:scale(1)   translateY(0)}
}

.item-head { display:flex;justify-content:space-between;align-items:flex-start;gap:8px;font-weight:800; }

.item-head-main {
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex-wrap:wrap;
}

.item-toggle-btn {
  width:28px;
  height:28px;
  border:2px solid var(--panel-bd);
  border-radius:999px;
  background:var(--wood-lt);
  color:var(--ink);
  font-size:15px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}

.item-toggle-btn:hover {
  border-color:var(--brand);
  color:var(--brand);
}

.quest-item-body {
  display:grid;
  gap:6px;
}

.pill {
  font-family:"Baloo 2",cursive;font-size:.78rem;font-weight:800;
  padding:3px 9px;border-radius:999px;border:2px solid var(--panel-bd);
  white-space:nowrap;background:var(--wood-lt);
}

.claim-status.claimed {
  background: #fff4cf;
  border-color: #e0be64;
}

.claim-status.delivered {
  background: #dff3d8;
  border-color: #74b968;
}

.claim-status.completed {
  background: #d9eef9;
  border-color: #6aaed2;
}

.quest-status.accepted {
  background: #fff4cf;
  border-color: #e0be64;
}

.quest-status.submitted {
  background: #d9eef9;
  border-color: #6aaed2;
}

.quest-status.rejected {
  background: #fde2db;
  border-color: #e48d76;
}

.quest-status.approved {
  background: #dff3d8;
  border-color: #74b968;
}

.muted{color:var(--ink-soft);font-size:.88rem;line-height:1.5}

.claim-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.claim-progress-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.claim-progress-step {
  text-align: center;
  font-size: .78rem;
  font-weight: 800;
  border: 1.5px solid var(--panel-bd);
  border-radius: 999px;
  padding: 4px 6px;
  background: #f0ede4;
  color: #8b7f6b;
}

.claim-progress-step.active {
  background: #ffe6bf;
  color: #8a4b16;
  border-color: #e1a45e;
}

.claim-progress-step.done {
  background: #dff3d8;
  color: #2f7d39;
  border-color: #74b968;
}

.review-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Reward card grid ── */
#reward-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  padding: 4px 0;
}

.reward-card {
  background: #fff;
  border: 2px solid var(--wood-lt);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 10px rgba(0,0,0,.10);
  transition: transform .15s, box-shadow .15s;
  position: relative;
}
.reward-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.reward-card.is-claimed {
  opacity: .6;
  filter: grayscale(.4);
}
.reward-card.no-points .reward-card-img-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,.18);
  border-radius: 0;
}


.confirm-modal {
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:10001;
  padding:16px;
}

.confirm-panel {
  width:min(420px, 92vw);
}

.confirm-actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
}
.reward-card-img-wrap {
  position: relative;
  background: linear-gradient(160deg,#e8f4ff,#d4edff);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.reward-card-img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.2));
}
.reward-card-img-placeholder {
  font-size: 2.5rem;
  line-height: 1;
}
.reward-card-cost {
  position: absolute;
  top: 6px; right: 6px;
  background: rgba(160,90,20,.85);
  color: #fff6d2;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: .03em;
}

.reward-card-body {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.reward-card-title {
  font-weight: 700;
  font-size: .88rem;
  color: var(--wood-dk);
  line-height: 1.3;
}
.reward-card-desc {
  font-size: .75rem;
  color: #888;
  line-height: 1.4;
  flex: 1;
}
.reward-card-btn {
  margin-top: 6px;
  width: 100%;
  padding: 6px 0;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
}
.reward-card-btn.btn-accent {
  background: var(--accent);
  color: #fff;
}
.reward-card-btn.btn-ghost {
  background: #e9e4dc;
  color: #aaa;
  cursor: default;
}

/* ── Button loading spinner ── */
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}
.btn-spinner {
  display: inline-block;
  width: 1em; height: 1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spin .6s linear infinite;
  vertical-align: middle;
  opacity: .85;
}

/* ground deco characters */
.ground-char {
  position:absolute;bottom:0;pointer-events:none;
  filter:drop-shadow(0 4px 8px rgba(0,0,0,.2));
  animation:bob 3s ease-in-out infinite;
}
.gc-left  { left:12px; width:110px;animation-delay:.3s; }
.gc-right { right:12px;width:130px;animation-delay:.9s; }

/* responsive */
@media (max-width:860px) {
  .layout          { grid-template-columns:1fr; }
  .hero-inner      { grid-template-columns:1fr; }
  .hero-chars      { justify-content:center;padding-bottom:8px; }
  .char-a{width:100px} .char-b{width:115px} .char-c{width:90px}
  .admin-quest-top-row { grid-template-columns:1fr; }
  .quest-refresh-controls { grid-template-columns:1fr; }
  .quest-admin-actions { flex-direction:column; }
}

@media (max-width:540px) {
  .page         { padding:16px 10px; }
  .status-bar   { gap:8px; }
  .hero-title   { font-size:2.1rem; }
  .quest-toolbar{ grid-template-columns:1fr; }
  .status-player { flex-wrap: wrap; }
  .status-counts { width: 100%; }
  .status-counts .count-chip { flex: 1 1 auto; justify-content: center; }
  .admin-form-panel,
  #admin-claims-board,
  #admin-review-board,
  #admin-template-board,
  #admin-deleted-quests-board,
  #admin-gift-history-board,
  #admin-gift-dispatch-panel,
  #admin-quest-tools {
    width: 100%;
  }
}

/* ── Quest category sections ── */
.quest-category-section { display:grid;gap:0;margin-bottom:18px; }

.quest-cat-header {
  display:flex;align-items:center;gap:8px;
  background:linear-gradient(135deg, var(--wood-lt) 0%, #fdf0c8 100%);
  border:2px solid var(--wood);border-bottom:none;
  border-radius:12px 12px 0 0;
  padding:8px 14px;
  font-family:"Baloo 2",cursive;font-size:1rem;font-weight:800;color:var(--ink);
  width:100%;cursor:pointer;text-align:left;
  transition:filter .15s;
}
.quest-cat-header:hover { filter:brightness(1.06); }

.cat-icon { font-size:1.1rem; }
.cat-title { flex:1; }
.cat-count {
  font-size:.8rem;font-weight:700;color:var(--ink-soft);
  background:var(--white);border:1.5px solid var(--panel-bd);
  border-radius:999px;padding:2px 9px;
}
.cat-toggle-arrow { margin-left:auto; font-size:1rem; transition:transform .2s; }

.cat-quest-list {
  display:grid;gap:10px;
  background:var(--panel);
  border:2px solid var(--wood);border-top:none;
  border-radius:0 0 0 0;
  padding:10px;
}

.cat-quest-list:last-child {
  border-radius:0 0 12px 12px;
}

/* Admin quest top row: 2-col grid (form + review side by side) */
.admin-quest-top-row {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  align-items:start;
}


.submission-row-head {
  width:100%;
  border:none;
  background:transparent;
  cursor:pointer;
  text-align:left;
  padding:0;
}

.submission-row-body {
  display:grid;
  gap:6px;
}

.giftbox-btn {
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.giftbox-badge {
  min-width:18px;
  height:18px;
  padding:0 6px;
  border-radius:999px;
  background:var(--brand);
  color:#fff;
  font-size:.72rem;
  font-weight:800;
  line-height:18px;
}

.giftbox-modal {
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9998;
  padding:16px;
}

.giftbox-modal-panel {
  width:min(760px, 96vw);
  max-height:88vh;
  overflow:auto;
  position:relative;
}

.giftbox-close-btn {
  position:static;
  margin-left:auto;
  width:34px;
  height:34px;
  font-size:1.1rem;
}

.giftbox-toolbar {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.giftbox-row-main {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
}

.giftbox-row-title {
  font-weight:800;
}

.giftbox-row-right {
  display:flex;
  align-items:center;
  gap:8px;
}

.giftbox-attachment-icon {
  font-size:.95rem;
}

.giftbox-row-actions {
  display:flex;
  gap:8px;
}

.giftbox-item.is-read {
  opacity:.88;
}
/* Proof image: thumbnail + actions */
.proof-img-wrap { display:grid; gap:6px; margin:6px 0; }
.proof-thumb {
  max-width:100%; max-height:200px; object-fit:cover;
  border-radius:8px; border:2px solid var(--panel-bd);
  cursor:zoom-in;
}
.proof-img-actions { display:flex; gap:8px; flex-wrap:wrap; }
.proof-dl { text-decoration:none; }

/* Image lightbox overlay */
.img-lightbox {
  position:fixed; inset:0;
  background:rgba(0,0,0,.85);
  display:flex; align-items:center; justify-content:center;
  z-index:9999;
}
.img-lightbox.is-hidden { display:none; }
.lightbox-img {
  max-width:90vw; max-height:85vh;
  border-radius:12px;
  box-shadow:0 8px 40px rgba(0,0,0,.6);
  object-fit:contain;
}
.lightbox-close {
  position:absolute; top:16px; right:20px;
  background:rgba(255,255,255,.15); border:none;
  color:#fff; font-size:1.4rem;
  width:40px; height:40px; border-radius:50%;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:background .15s;
}
.lightbox-close:hover { background:rgba(255,255,255,.3); }

/* bonus banner */
.category-bonus-banner {
  display:flex;align-items:center;gap:12px;
  background:linear-gradient(135deg,#fffbe6,#fff3cc);
  border:2px solid var(--gold);border-top:none;
  border-radius:0 0 12px 12px;
  padding:10px 14px;
  box-shadow:0 4px 0 #c49020;
  animation:pop-in .35s ease both;
}
.bonus-text {
  flex:1;font-size:.9rem;font-weight:800;color:var(--ink);
}

/* ── Round buttons ── */
.btn-round-accept {
  background:linear-gradient(135deg,#f47a5a,var(--brand));
  color:#fff;border:none;border-radius:999px;
  min-width:108px;height:38px;flex-shrink:0;
  padding:0 14px;
  font-family:"Baloo 2",cursive;font-size:.8rem;font-weight:800;
  cursor:pointer;text-align:center;line-height:1.2;
  box-shadow:0 3px 0 #a83020,0 6px 14px rgba(0,0,0,.18);
  transition:transform .15s,box-shadow .15s;
  display:inline-flex;align-items:center;justify-content:center;
  letter-spacing:.04em;
}
.btn-round-accept:hover  { transform:translateY(-2px);box-shadow:0 5px 0 #a83020,0 8px 18px rgba(0,0,0,.2); }
.btn-round-accept:active { transform:translateY(2px);box-shadow:none; }

.btn-round-bonus {
  background:linear-gradient(135deg,#f6d35a,var(--gold));
  color:var(--ink);border:none;border-radius:50%;
  width:52px;height:52px;flex-shrink:0;
  font-family:"Baloo 2",cursive;font-size:.72rem;font-weight:800;
  cursor:pointer;text-align:center;line-height:1.2;
  box-shadow:0 3px 0 #c49020,0 6px 14px rgba(0,0,0,.18);
  transition:transform .15s,box-shadow .15s;
  display:inline-flex;flex-direction:column;align-items:center;justify-content:center;
}
.btn-round-bonus:hover  { transform:translateY(-2px);box-shadow:0 5px 0 #c49020,0 8px 18px rgba(0,0,0,.2); }
.btn-round-bonus:active { transform:translateY(2px);box-shadow:none; }
.btn-round-bonus[disabled] { opacity:.65;cursor:default;transform:none;box-shadow:0 3px 0 #c49020; }

/* ── Announcements ── */
.announcement-item {
  border-radius: 12px;
  padding: 10px 14px;
  display: grid;
  gap: 6px;
  border: 2px solid;
  animation: pop-in .3s ease both;
}
.announcement-item.system { background: #f0f5ff; border-color: #8aabdf; }
.announcement-item.event  { background: #fffbe6; border-color: var(--gold); }
.ann-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ann-type-badge {
  font-size: .75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ann-type-badge.system { background: #c3d9f5; color: #2a5080; }
.ann-type-badge.event  { background: #ffe58a; color: #7a5500; }
.ann-title   { font-weight: 800; flex: 1; }
.ann-content { font-size: .9rem; color: var(--ink-soft); line-height: 1.5; }
.ann-event-time {
  font-size: .85rem; font-weight: 700;
  color: #7a5500; background: #fff3cc;
  border-radius: 8px; padding: 4px 10px;
  display: inline-block;
}
.ann-delete-btn {
  background: var(--brand); color: #fff;
  border: none; border-radius: 50%;
  width: 26px; height: 26px;
  font-size: 13px; font-weight: bold;
  cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  transition: background .18s;
  margin-left: auto;
}
.ann-delete-btn:hover { background: #c0492c; }
