@font-face{font-family:'Lilita One';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/store/lilita-one-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Lilita One';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/store/lilita-one-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Manrope;font-style:normal;font-weight:400 900;font-display:swap;src:url('/fonts/store/manrope-vietnamese.woff2') format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:Manrope;font-style:normal;font-weight:400 900;font-display:swap;src:url('/fonts/store/manrope-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Manrope;font-style:normal;font-weight:400 900;font-display:swap;src:url('/fonts/store/manrope-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root {
  --cream: #fff0c1;
  --card-bg: #ffecbc;
  --card-border: #ffd13a;
  --card-shadow: #d4a92c;
  --gold: #f3bd35;
  --sky: #54c3ef;
  --sky-dark: #3ba8d4;
  --ink: #3d2b1f;
  --brown: #493833;
  --line: #dcc57f;
  --global-orange: #f39a37;
  --vng-blue: #54b8e6;
  --disabled-gray: #171717;
  --font-game: 'Baloo 2', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: 'Baloo 2', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #59c5ee; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background: #59c5ee url('/source/static-platform.aghanim.com/cdn-cgi/image/width=1600,quality=80,fit=scale-down,format=webp,dpr=2/news/77/91/d4/53/7791d453-e2e6-44fa-87b0-2beb43a68797.webp') center/cover fixed no-repeat;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button, a { touch-action: manipulation; }
svg { width: 22px; height: 22px; fill: currentColor; }

/* SIDEBAR */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 256px;
  padding: 16px 20px;
  overflow-y: auto;
  background: rgba(255, 239, 193, 0.98);
  box-shadow: 2px 0 10px rgba(0,0,0,0.06);
  z-index: 20;
  transition: transform .22s ease;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #362a28;
  text-decoration: none;
  margin-bottom: 20px;
}
.brand img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
  border: 1.5px solid #e2be64;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.brand span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.brand strong {
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 155px;
  color: var(--ink);
}
.brand small {
  margin-top: 2px;
  color: #526171;
  font-size: 12px;
  font-weight: 600;
}
.brand small b {
  color: #58a7cd;
  font-size: 9px;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 22px;
  color: #463734;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  transition: all .15s ease;
}
nav a.active, nav a:hover {
  background: #ffe296;
  color: #2b1f1a;
}

.socials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 24px;
}
.socials a {
  height: 38px;
  border: 1.5px solid #5b443a;
  border-radius: 20px;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: #59413c;
  background: #fff8e3;
  transition: all .15s ease;
}
.socials a:hover {
  background: #f7dfa3;
  transform: translateY(-1px);
}

.haegin {
  display: block;
  width: 140px;
  height: 54px;
  object-fit: contain;
  margin: 24px auto 14px;
  border-bottom: 2px solid #79ccee;
  padding: 0 8px 6px;
}
.admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px auto;
  color: #5b443a;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 6px 14px;
  border-radius: 16px;
  background: rgba(235, 210, 150, 0.4);
  text-decoration: none;
  transition: background .15s;
}
.admin-link:hover {
  background: #ffe19b;
}

/* RIGHTBAR */
.rightbar {
  position: fixed;
  right: 24px;
  top: 18px;
  width: 208px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-pill, .support {
  padding: 11px 16px;
  text-align: center;
  background: #8bd3ee;
  border-radius: 26px;
  color: white;
  text-decoration: none;
  font: 19px var(--font-game);
  text-shadow: 0 2px #5b5b5b;
  box-shadow: 0 4px 0 rgba(45,118,145,.35);
}
.rating, .support {
  background: #fff0c1;
  color: #4c3c38;
  text-shadow: none;
  font: 13px var(--font-body);
}
.rating {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  font-weight: 600;
}
.rating strong {
  display: grid;
  place-items: center;
  background: #96ae2d;
  color: white;
  border: 3px solid white;
  outline: 1px solid #777;
  width: 32px;
  height: 38px;
  font-size: 24px;
  border-radius: 4px;
}
.support {
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
}
.mobile-menu {
  display: grid;
  place-items: center;
  position: fixed;
  z-index: 30;
  left: 246px;
  top: 24px;
  width: 34px;
  height: 42px;
  padding: 0;
  border: 2px solid var(--gold);
  border-radius: 13px;
  background: var(--cream);
  color: #493833;
  font-size: 25px;
  box-shadow: 0 3px 0 var(--card-shadow), 0 5px 14px rgba(73,56,51,.16);
  cursor: pointer;
  transition: left .22s ease, background .15s ease;
}
.mobile-menu:hover { background: #ffe49a; }
.sidebar-scrim { display: none; }
.page { transition: margin-left .22s ease; }
body.menu-collapsed .sidebar { transform: translateX(-100%); }
body.menu-collapsed .mobile-menu { left: 12px; }
body.menu-collapsed .page { margin-left: 0; }

/* PAGE LAYOUT */
.page {
  margin-left: 256px;
  margin-right: 256px;
  padding: 32px;
  min-height: 100vh;
}

/* TYPOGRAPHY */
.game-title, .section-title {
  font-family: var(--font-game);
  font-weight: 800;
  text-transform: uppercase;
  color: white;
  letter-spacing: 0.3px;
  paint-order: stroke fill;
  -webkit-text-stroke: 1.4px #46342f;
  text-shadow: 0 2.5px 0 #46342f;
  line-height: 1.25;
}

/* HOME PAGE */
.home-page {
  max-width: 768px;
  margin-inline: auto;
}
.hero {
  background: var(--cream);
  border: 4px solid var(--gold);
  border-radius: 26px;
  padding: 30px 36px;
  box-shadow: 0 4px 0 var(--card-shadow);
}
.hero .game-title {
  margin: 0;
  color: #fff;
  font-size: 26px;
  paint-order: stroke fill;
  -webkit-text-stroke: 1.5px #3d2b1f;
  text-shadow: 0 2.5px 0 #3d2b1f;
}
.hero p {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: #493833;
  font-weight: 600;
}

.chat-shell {
  margin-top: 28px;
  border: 4px solid var(--gold);
  border-radius: 28px;
  background: var(--cream);
  box-shadow: 0 4px 0 var(--card-shadow);
  padding: 22px;
  min-height: 420px;
}
.chat-intro {
  display: grid;
  grid-template-columns: 38% 1fr;
  align-items: center;
  gap: 20px;
}
.chat-intro img {
  width: 100%;
  aspect-ratio: 1.15;
  object-fit: contain;
  background: #fff;
  border-radius: 18px;
  padding: 8px;
  border: 2px solid #e7cd82;
}
.chat-intro h2 {
  font: 27px var(--font-game);
  font-weight: 800;
  text-align: center;
  color: white;
  paint-order: stroke fill;
  -webkit-text-stroke: 1.5px #493833;
  text-shadow: 0 3px 0 #493833;
  margin: 0;
}
.chat-login {
  text-align: center;
  padding: 20px 10px;
}
.chat-login.hidden { display: none; }
.chat-login p {
  margin-top: 0;
  font-weight: 600;
  color: #493833;
}
.centered { justify-content: center; }

.rounded-input {
  border: 2px solid #e2bd61;
  background: white;
  border-radius: 22px;
  padding: 10px 16px;
  outline: none;
  font-size: 15px;
  color: #333;
}
.rounded-input:focus, .field input:focus, .field textarea:focus, .field select:focus {
  border-color: #53add2;
  box-shadow: 0 0 0 3px rgba(83,173,210,.25);
}
.primary-button {
  border: 0;
  border-radius: 22px;
  padding: 10px 22px;
  background: var(--sky);
  color: white;
  font: 17px var(--font-game);
  font-weight: 800;
  text-shadow: 0 2px 0 #3b7c98;
  cursor: pointer;
  box-shadow: inset 0 -4px 0 rgba(46,124,155,.3);
  transition: transform .1s, filter .15s;
}
.primary-button:hover {
  filter: brightness(1.05);
}
.primary-button:active {
  transform: translateY(1px);
}

.chat-room { display: none; }
.chat-room.active { display: block; }
.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 2px 10px;
  padding: 4px 6px;
  border-bottom: 1.5px solid #edd596;
}
.dynamic-island {
  --island-width: 44px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 44px;
  height: 40px;
  min-width: 44px;
  max-width: min(260px, 65vw);
  padding: 4px 13px 4px 6px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  background: #050505;
  color: #fff;
  box-shadow: 0 5px 15px rgba(0,0,0,.24), inset 0 0 0 1px rgba(255,255,255,.04);
  cursor: pointer;
  isolation: isolate;
  transition: width .68s cubic-bezier(.18,1.32,.36,1), border-radius .45s cubic-bezier(.2,.9,.25,1), transform .18s ease, box-shadow .35s ease;
  -webkit-tap-highlight-color: transparent;
}
.dynamic-island::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle at 22% 10%, rgba(84,195,239,.15), transparent 36%);
  opacity: 0;
  transition: opacity .35s ease;
}
.dynamic-island.active { width: var(--island-width); }
.dynamic-island:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(0,0,0,.28), 0 0 0 2px rgba(84,195,239,.2); }
.dynamic-island:active { transform: scale(.97); }
.dynamic-island:focus-visible { outline: 3px solid rgba(84,195,239,.55); outline-offset: 3px; }
.dynamic-island.active::after, .dynamic-island.confirm-logout::after { opacity: 1; }
.island-orb {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #111;
  transform: translateX(1px) scale(.76);
  transition: transform .65s cubic-bezier(.18,1.32,.36,1), background .3s ease;
}
.island-orb i { width: 9px; height: 9px; border-radius: 50%; background: #61d3f5; box-shadow: 0 0 0 4px rgba(97,211,245,.14), 0 0 12px rgba(97,211,245,.75); }
.dynamic-island.active .island-orb { transform: translateX(0) scale(1); }
.island-copy { display: inline-flex; align-items: center; min-width: 0; margin-left: 7px; opacity: 0; transform: translateX(-9px) scale(.94); white-space: nowrap; transition: opacity .22s ease .17s, transform .52s cubic-bezier(.18,1.18,.32,1) .08s; }
.dynamic-island.active .island-copy { opacity: 1; transform: none; }
.island-label { min-width: 0; overflow: hidden; color: #fff; font-size: 14px; font-weight: 750; line-height: 1; text-overflow: ellipsis; }
.island-angle { width: 12px; color: #70d8f5; font-size: 15px; font-weight: 900; text-align: center; transition: width .28s ease, opacity .2s ease, transform .3s ease; }
.dynamic-island.confirm-logout { --island-width: 148px; box-shadow: 0 7px 20px rgba(0,0,0,.3), 0 0 0 2px rgba(255,107,92,.22); }
.dynamic-island.confirm-logout .island-orb { background: #32100d; }
.dynamic-island.confirm-logout .island-orb i { background: #ff6b5c; box-shadow: 0 0 0 4px rgba(255,107,92,.13), 0 0 12px rgba(255,107,92,.65); }
.dynamic-island.confirm-logout .island-angle { width: 0; opacity: 0; transform: scale(.5); }
.dynamic-island.leaving { width: 44px; opacity: .72; transform: scale(.92); transition: width .5s cubic-bezier(.55,0,.8,.3), opacity .42s ease, transform .42s ease; }
.dynamic-island.joining { animation: island-breathe .72s cubic-bezier(.18,1.15,.32,1); }
@keyframes island-breathe {
  0% { transform: scale(.82, 1.08); }
  42% { transform: scale(1.035, .96); }
  72% { transform: scale(.988, 1.01); }
  100% { transform: scale(1); }
}

/* Chat Island imported from the supplied reference: one surface morphs between entry, compact and expanded. */
.island-stage { display: flex; justify-content: center; align-items: flex-start; width: 100%; min-width: 0; margin: 24px auto 0; }
.chat-island {
  position: relative;
  isolation: isolate;
  flex: none;
  width: 440px;
  max-width: 100%;
  height: 112px;
  overflow: hidden;
  border: 1px solid #343438;
  border-radius: 32px;
  background: #111113;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.07);
  transition: width 620ms cubic-bezier(.22,1.22,.36,1), height 620ms cubic-bezier(.22,1.12,.36,1), border-radius 620ms cubic-bezier(.22,1,.36,1), box-shadow 400ms ease;
}
.chat-island[data-state="compact"] { border-radius: 30px; box-shadow: 0 5px 12px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.07); }
.island-panel { position: absolute; inset: 0; margin: 0; opacity: 0; transform: translateY(9px) scale(.97); filter: blur(4px); pointer-events: none; transition: opacity 150ms ease, transform 240ms ease, filter 220ms ease; color: inherit; }
.chat-island[data-state="hello"] .island-hello,
.chat-island[data-state="welcome"] .island-welcome,
.chat-island[data-state="entry"] .island-entry,
.chat-island[data-state="compact"] .island-identity,
.chat-island[data-state="expanded"] .island-exit { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); pointer-events: auto; transition: opacity 260ms ease 150ms, transform 480ms cubic-bezier(.16,1,.3,1) 100ms, filter 300ms ease 100ms; }
.island-entry { display: flex; flex-direction: column; justify-content: center; gap: 9px; padding: 16px 18px; text-align: left; }
.island-hello { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 9px 22px; border: 0; background: transparent; color: #fff; cursor: pointer; }
.island-hello .hello-script { display: block; flex: none; width: 100%; max-width: 206px; height: 38px; margin: auto; overflow: visible; fill: none; stroke: #fff; stroke-width: 14.8883; stroke-linecap: round; transform: translateY(-1px); }
.island-hello .hello-script[hidden] { display: none; }
.island-hello path { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.chat-island[data-state="hello"] .hello-script.is-writing path { animation: hello-handwriting .65s ease-in-out forwards; }
.chat-island[data-state="hello"] .hello-script.is-writing path:nth-of-type(2) { animation-delay: .26s; }
.chat-island[data-state="hello"] .hello-script.is-writing path:nth-of-type(3) { animation-delay: .52s; }
.chat-island[data-state="hello"] .hello-script.is-writing path:nth-of-type(4) { animation-delay: .78s; }
.chat-island[data-state="hello"] .hello-script.is-writing path:nth-of-type(5) { animation-delay: 1.04s; }
.chat-island[data-state="hello"] .hello-script.is-writing path:nth-of-type(6) { animation-delay: 1.3s; }
.chat-island[data-state="hello"] .hello-script.is-writing path:nth-of-type(7) { animation-delay: 1.56s; }
.chat-island[data-state="hello"] .hello-script.is-writing path:nth-of-type(8) { animation-delay: 1.82s; }
.chat-island[data-state="hello"] .hello-script.is-writing path:nth-of-type(9) { animation-delay: 2.08s; }
@keyframes hello-handwriting { 0% { stroke-dashoffset: 1; opacity: 0; } 8% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
.chat-island[data-state="hello"] { border-radius: 30px; box-shadow: 0 5px 16px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.08); }
.island-welcome { width: 100%; padding: 0 16px; border: 0; background: transparent; color: #fff; font: 800 16px var(--font-body); cursor: pointer; }
.island-welcome:focus-visible { outline: 0; text-decoration: underline; text-decoration-color: rgba(255,255,255,.7); text-underline-offset: 4px; }
.chat-island[data-state="welcome"] { border-radius: 30px; animation: island-invitation 2.4s ease-in-out infinite; }
@keyframes island-invitation {
  0%, 65%, 100% { transform: scale(1); }
  18% { transform: scale(1.025); }
  34% { transform: scale(1); }
  46% { transform: scale(1.015); }
}
.island-entry > label { color: #ceced2; font-size: 13px; font-weight: 700; white-space: nowrap; }
.island-entry-row { display: flex; gap: 8px; min-width: 0; }
.island-entry input { flex: 1; width: 100%; min-width: 0; padding: 10px 13px; outline: none; border: 1px solid #48484e; border-radius: 20px; background: #29292d; color: #fff; font: 600 16px var(--font-body); }
.island-entry input::placeholder { color: #a9a9b2; }
.island-entry input:focus { border-color: #8bd3ee; box-shadow: 0 0 0 3px rgba(139,211,238,.15); }
.island-entry button { flex: none; padding: 10px 14px; border: 0; border-radius: 22px; background: var(--sky); color: #102e3a; font: 800 14px var(--font-body); cursor: pointer; }
.island-validation { min-height: 0; color: #ffb8b0; font-size: 12px; line-height: 1.35; }
.island-validation:empty { display: none; }
.island-identity { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 0 20px; border: 0; background: transparent; color: #fff; font: 800 16px var(--font-body); cursor: pointer; }
#island-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.island-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #81e0b0; box-shadow: 0 0 0 4px rgba(129,224,176,.1), 0 0 9px rgba(129,224,176,.35); }
.chat-island .island-angle { width: auto; color: #70d8f5; font-size: 15px; }
.island-chevron { margin-left: 2px; color: #9999a2; font-size: 19px; line-height: 1; }
.island-exit { display: flex; flex-direction: column; justify-content: center; gap: 11px; padding: 15px 18px; }
.island-exit-name { overflow: hidden; color: #d5d5dd; font-size: 14px; font-weight: 700; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.island-exit-actions { display: flex; gap: 8px; }
.island-exit-actions button { flex: 1; min-height: 42px; border: 0; border-radius: 22px; background: #303036; color: #f4f4f5; font: 800 14px var(--font-body); cursor: pointer; }
.island-exit-actions #chat-logout { background: #ffb4a8; color: #561a15; }
.chat-island button:not(.island-welcome):not(.island-hello):focus-visible { outline: 2px solid #a6ddf2; outline-offset: -4px; }
.island-hello:focus-visible { outline: 0; filter: drop-shadow(0 0 4px rgba(255,255,255,.35)); }
.chat-island button:active { filter: brightness(.87); }
.chat-reveal { display: grid; grid-template-rows: 0fr; opacity: 0; overflow: hidden; transform: translateY(-8px); transition: grid-template-rows 620ms cubic-bezier(.22,1,.36,1), opacity 250ms ease, transform 500ms ease; }
.chat-reveal.is-open { grid-template-rows: 1fr; opacity: 1; transform: translateY(0); transition: grid-template-rows 620ms cubic-bezier(.22,1,.36,1), opacity 380ms ease 180ms, transform 620ms cubic-bezier(.22,1,.36,1); }
.chat-room.island-room { display: block; min-height: 0; overflow: hidden; }
.island-room .chat-head { justify-content: flex-end; margin-top: 0; padding-top: 18px; }
.island-room .chat-form { padding-bottom: 4px; }
.is-restoring, .is-restoring .island-panel { transition: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.chat-head small {
  font-weight: 700;
  color: #634b3d;
  background: #ffe8aa;
  padding: 3px 10px;
  border-radius: 12px;
}
.online-dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #28a745; box-shadow: 0 0 0 3px rgba(40,167,69,.14); }
.chat-messages {
  height: 260px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  padding: 14px;
  border: 1.5px solid #e7cd82;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-message {
  margin: 0;
  padding: 7px 11px;
  background: #fffcf2;
  border-radius: 12px;
  border: 1px solid #f0deaa;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
  width: fit-content;
  max-width: min(82%, 520px);
  display: grid;
  gap: 3px;
}
.chat-message.own { align-self: flex-end; background: #55bce8; border-color: #329ac7; color: #fff; border-bottom-right-radius: 4px; }
.chat-message.other { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.chat-message.own strong, .chat-message.own time { color: #fff; }
.chat-message strong {
  color: #1c7c9c;
  font-weight: 800;
  margin-right: 6px;
}
.chat-message time {
  justify-self: end;
  color: #917c6e;
  font-size: 11px;
  margin-left: 8px;
}
.chat-media { display: block; width: min(100%, 320px); max-height: 260px; object-fit: contain; border-radius: 12px; background: rgba(255,255,255,.65); }
.chat-media.is-sticker { width: 76px; height: 76px; background: transparent; }
.typing-indicator { min-height: 22px; padding: 2px 10px; color: #6f5a4b; font-size: 13px; font-style: italic; }
.sticker-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; max-height: 190px; overflow-y: auto; margin-top: 8px; padding: 8px; border-radius: 16px; background: #fff8e7; border: 1.5px solid #e7cd82; }
.sticker-picker[hidden] { display: none; }
.sticker-picker button { padding: 3px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; }
.sticker-picker button:hover { background: #ffe9ae; }
.sticker-picker img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.chat-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.chat-form > input { flex: 1; min-width: 0; }
.chat-tool { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border: 1.5px solid #d8b75c; border-radius: 50%; background: #fff; color: #5b443a; font-size: 22px; font-weight: 800; cursor: pointer; }
.chat-file-name { min-height: 18px; padding: 3px 8px 0; color: #725f50; font-size: 12px; }

/* CODE PAGE (PLAYPACKAGE) */
.code-page {
  max-width: 980px;
  margin-inline: auto;
}
.code-header-shell {
  margin-bottom: 24px;
}
.code-filter-wrap { position: relative; width: fit-content; margin-bottom: 12px; }
.filter-menu-button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 14px; border: 2px solid #e3bf62; border-radius: 18px; background: #fff7df; color: #493833; font-weight: 800; cursor: pointer; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.filter-menu-button svg { width: 20px; height: 20px; }
.filter-menu-button b { display: none; width: 21px; height: 21px; place-items: center; border: 2px solid #fff; border-radius: 8px; background: linear-gradient(145deg, #65ca7d, #2fa956); color: #fff; font-size: 13px; line-height: 1; box-shadow: 0 2px 0 #218641, 0 2px 8px rgba(47,169,86,.25); }
.filter-menu-button b span { transform: translateY(-1px); }
.filter-menu-button.applied b { display: grid; }
.filter-menu-button[aria-expanded="true"] { border-color: #3a2c21; background: #ffe8a7; }
.filter-popover { position: absolute; z-index: 12; top: calc(100% + 7px); left: 0; width: min(290px, calc(100vw - 28px)); padding: 15px; border: 2px solid #d8b75c; border-radius: 18px; background: #fff9e8; box-shadow: 0 10px 28px rgba(55,42,30,.24); }
.filter-popover[hidden] { display: none; }
.filter-popover > strong { display: block; margin-bottom: 9px; color: #493833; }
.filter-popover label { display: flex; align-items: center; gap: 11px; margin: 6px 0; padding: 10px 12px; border: 1.5px solid #ecd488; border-radius: 14px; background: rgba(255,255,255,.62); color: #493833; font-weight: 700; cursor: pointer; transition: transform .12s ease, border-color .12s ease, background .12s ease; }
.filter-popover label:hover { transform: translateY(-1px); border-color: #55b9e3; background: #fff; }
.filter-popover input { appearance: none; display: grid; flex: 0 0 23px; width: 23px; height: 23px; place-items: center; margin: 0; border: 2px solid #d5b85e; border-radius: 8px; background: #fffdf5; cursor: pointer; transition: all .14s ease; }
.filter-popover input::after { content: "✓"; color: #fff; font-size: 15px; font-weight: 900; line-height: 1; transform: scale(0) rotate(-18deg); transition: transform .14s ease; }
.filter-popover input:checked { border-color: #359bc7; background: linear-gradient(145deg, #67c9ef, #3ba8d4); box-shadow: 0 2px 0 #237fa7; }
.filter-popover input:checked::after { transform: scale(1) rotate(0); }
.filter-popover input:focus-visible { outline: 3px solid rgba(84,195,239,.35); outline-offset: 2px; }
.filter-popover small { display: block; margin: 5px 2px 12px; color: #786353; font-size: 12px; line-height: 1.4; }
.confirm-filter { width: 100%; font-size: 15px; }
.code-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.section-title {
  font-size: 28px;
  margin: 0;
}

/* HORIZONTAL SCROLLABLE TABS */
.tabs-scroll-container {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 8px;
}
.tabs-scroll-container::-webkit-scrollbar { display: none; }
.tabs-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: min-content;
}
.tab-pill {
  flex: 0 0 auto;
  height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: 20px;
  background: #fdf5e4;
  color: #3d2b1f;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(0,0,0,0.08);
  transition: all .15s ease;
  white-space: nowrap;
}
.tab-pill:hover {
  background: #faecd0;
}
.tab-pill.active, .tab-pill[data-selected="true"] {
  background: #3a2c21;
  color: #ffffff;
  box-shadow: 0 3px 0 rgba(0,0,0,0.22);
}

/* CATEGORY SECTION */
.category-section {
  margin-bottom: 38px;
  scroll-margin-top: 75px;
}
.category-title {
  font-size: 24px;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.category-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: rgba(70, 52, 47, 0.2);
  border-radius: 1px;
}

/* CARDS GRID: 2 COLUMNS ON MOBILE, 3-4 ON DESKTOP */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
@media (min-width: 640px) {
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 16px;
  }
}

/* CODE CARD */
.code-card {
  background: var(--card-bg);
  border: 4px solid var(--card-border);
  border-radius: 28px;
  padding: 10px;
  box-shadow: 0 4px 0 var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  min-width: 0;
  width: 100%;
  position: relative;
}
.code-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--card-shadow);
}
.code-card h3 {
  font-family: var(--font-game);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  color: white;
  paint-order: stroke fill;
  -webkit-text-stroke: 1.1px #3d2b1f;
  text-shadow: 0 2px 0 #3d2b1f;
  line-height: 1.25;
  margin: 6px 2px 8px;
  min-height: 38px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.code-updated-time { min-height: 18px; margin: -3px 4px 2px; color: #705d52; font-size: 12px; font-weight: 700; line-height: 1.3; text-align: center; }
.code-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #fedf7b;
  display: block;
}
.code-card.expired { cursor: not-allowed; }
.code-card.expired:hover { transform: none; box-shadow: 0 4px 0 var(--card-shadow); }
.code-card.expired .card-action { background: #514b47; color: #fff; text-shadow: none; box-shadow: inset 0 -4px rgba(0,0,0,.22); cursor: not-allowed; }
.version-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #fce8bb;
  border: 1.5px solid #dcb56a;
  border-radius: 14px;
  padding: 4px 10px;
  margin: 8px auto;
  font-family: var(--font-game);
  font-size: 13px;
  color: #3d2b1f;
  font-weight: 700;
  max-width: 90%;
  white-space: nowrap;
}
.card-action {
  width: 100%;
  border: 0;
  border-radius: 20px;
  padding: 9px;
  background: var(--sky);
  color: white;
  font: 17px var(--font-game);
  font-weight: 800;
  text-shadow: 0 2px 0 #397a96;
  box-shadow: inset 0 -4px rgba(46,124,155,.3);
  cursor: pointer;
  transition: all .15s ease;
}
.code-card:hover .card-action {
  filter: brightness(1.05);
}

.empty {
  grid-column: 1 / -1;
  background: rgba(255, 240, 193, 0.9);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
  font-weight: 700;
  color: #634e44;
}

/* DETAIL DIALOG / POPUP */
.detail-dialog {
  border: 4px solid var(--card-border);
  border-radius: 28px;
  padding: 0;
  width: min(700px, calc(100% - 24px));
  background: var(--cream);
  box-shadow: 0 10px 50px rgba(18, 38, 54, 0.4);
  overflow: visible;
  animation: dialogFadeIn .2s ease-out;
}
@keyframes dialogFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.detail-dialog::backdrop {
  background: rgba(18, 32, 44, 0.72);
  backdrop-filter: blur(2px);
}
.dialog-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: 0;
  background: #403630;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
  display: grid;
  place-items: center;
  transition: transform .15s;
}
.dialog-close:hover {
  transform: rotate(90deg);
}
.detail-body {
  padding: 24px;
}
.dialog-kicker {
  padding-right: 40px;
  font: 25px var(--font-game);
  font-weight: 800;
  color: white;
  paint-order: stroke fill;
  -webkit-text-stroke: 1.4px var(--brown);
  text-shadow: 0 2.5px 0 var(--brown);
  margin-bottom: 14px;
}
.detail-main {
  display: grid;
  grid-template-columns: minmax(180px, 42%) 1fr;
  gap: 18px;
  align-items: start;
}
.detail-main > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
  background: white;
  border-radius: 18px;
  border: 2px solid #e7cd82;
}
.detail-copy h2 {
  font: 21px var(--font-game);
  font-weight: 800;
  margin: 0 0 6px;
  color: #3d2b1f;
  line-height: 1.25;
}
.detail-copy .version-tag {
  justify-content: flex-start;
  margin: 0 0 8px;
  padding: 3px 8px;
}
.detail-copy p {
  font-size: 14px;
  line-height: 1.5;
  margin: 8px 0 0;
  color: #493833;
  font-weight: 600;
}
.bonus-box {
  background: #fff9e8;
  border: 2px solid #f0c85e;
  border-radius: 14px;
  padding: 10px 12px;
  margin: 8px 0;
}
.bonus-box strong {
  display: block;
  font: 16px var(--font-game);
  font-weight: 800;
  color: #995c00;
  margin-bottom: 2px;
}
.bonus-box span {
  font-size: 13.5px;
  font-weight: 700;
  color: #46342f;
}

/* 2 BUTTONS: GLOBAL (ORANGE, LEFT) & VNG (BLUE, RIGHT) */
.version-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}
.version-action {
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  padding: 8px 12px;
  text-decoration: none;
  color: white;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: inset 0 -4px rgba(0,0,0,.2);
  transition: all .15s ease;
}
.version-action small {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  opacity: 0.9;
}
.version-action strong {
  font: 18px var(--font-game);
  font-weight: 800;
  margin-top: 2px;
}
.global-action {
  background: var(--global-orange);
}
.global-action:hover {
  filter: brightness(1.06);
}
.vng-action {
  background: var(--vng-blue);
}
.vng-action:hover {
  filter: brightness(1.06);
}
.version-action.disabled {
  background: var(--disabled-gray);
  color: #f0f0f0;
  filter: saturate(0);
  cursor: pointer;
}
.version-action.disabled:hover {
  background: #000;
}

.dialog-error {
  min-height: 0;
  margin-top: 0;
  padding: 0;
  text-align: center;
  color: #ba2823;
  font-weight: 800;
  font-size: 14px;
  transition: all .15s ease;
}
.dialog-error.show {
  min-height: 24px;
  margin-top: 10px;
  padding: 4px 8px;
  background: #ffe3e1;
  border-radius: 10px;
}

/* ADMIN DASHBOARD */
.admin-page {
  max-width: 1060px;
  margin-inline: auto;
}
.admin-header-card {
  background: rgba(255, 240, 193, 0.98);
  border: 4px solid var(--gold);
  border-radius: 26px;
  padding: 22px 28px;
  margin-bottom: 20px;
  box-shadow: 0 4px 0 var(--card-shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-header-card h1 {
  font: 26px var(--font-game);
  font-weight: 800;
  margin: 0;
  color: #fff;
  paint-order: stroke fill;
  -webkit-text-stroke: 1.4px #3d2b1f;
  text-shadow: 0 2.5px 0 #3d2b1f;
}
.admin-header-card p {
  margin: 4px 0 0;
  font-size: 14px;
  color: #5b443a;
  font-weight: 600;
}
.admin-tabs-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.admin-tab-btn {
  flex: 0 0 auto;
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  background: #fdf4df;
  color: #493833;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(0,0,0,0.08);
  transition: all .15s;
}
.admin-tab-btn.active {
  background: #3a2c21;
  color: white;
  box-shadow: 0 3px 0 rgba(0,0,0,0.25);
}

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.admin-card {
  background: rgba(255, 240, 193, 0.98);
  border: 4px solid var(--gold);
  border-radius: 26px;
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: 0 4px 0 var(--card-shadow);
}
.admin-card h2 {
  font: 22px var(--font-game);
  font-weight: 800;
  margin: 0 0 16px;
  color: #3d2b1f;
}

.admin-form { display: grid; gap: 14px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 14px;
}
.field > span {
  font-weight: 800;
  color: #46342f;
}
.field input, .field textarea, .field select {
  width: 100%;
  border: 1.5px solid #d8b75c;
  border-radius: 14px;
  padding: 10px 14px;
  background: white;
  outline: none;
  font-size: 14px;
}
.field textarea {
  min-height: 80px;
  resize: vertical;
}
.span-2 { grid-column: 1 / -1; }

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.secondary-button, .danger-button {
  border: 1.5px solid #8e7442;
  border-radius: 20px;
  padding: 9px 16px;
  background: white;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: all .15s;
}
.secondary-button:hover {
  background: #fdf5e2;
}
.danger-button {
  border-color: #bf4a45;
  color: #a42b27;
}
.danger-button:hover {
  background: #ffebe9;
}

/* LIVE PREVIEW BOXES */
.preview-shell {
  background: #fff8e8;
  border: 2px dashed #d8b75c;
  border-radius: 20px;
  padding: 16px;
  margin-top: 14px;
}
.preview-shell small {
  display: block;
  font-weight: 800;
  color: #7d6544;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}
.brand-preview {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  padding: 8px 14px;
  background: #ffeebf;
  border-radius: 18px;
  border: 1.5px solid #e2be64;
}
.brand-preview img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.upload-box {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 2px dashed #bd9b4d;
  border-radius: 18px;
  background: #fffcf4;
}
.upload-box strong { font-size: 15px; color: #46342f; }
.upload-box span { font-size: 12px; color: #776251; }
.upload-thumb {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #d8b75c;
  margin: 4px 0;
}

/* ADMIN CATEGORIES & VISUAL CARD PREVIEW */
.admin-category-block {
  border-top: 2px solid var(--line);
  padding-top: 20px;
  margin-top: 20px;
}
.admin-category-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.admin-category-head input {
  font-size: 16px;
  font-weight: 800;
  max-width: 260px;
}

.admin-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.admin-card-item {
  background: #fff9eb;
  border: 2px solid #e5c165;
  border-radius: 20px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.admin-card-item.expired { background: #dedbd5; border-color: #79736c; }
.status-hidden { background: #493833; color: #fff; }
.status-expired { background: #b92d27; color: #fff; }
.admin-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e5c165;
}
.admin-card-item h4 {
  margin: 8px 0 4px;
  font-size: 14px;
  font-weight: 800;
  color: #3d2b1f;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 34px;
}
.admin-status-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 6px 0;
}
.admin-status-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
}
.status-on { background: #d4f4d2; color: #1e6e22; }
.status-off { background: #ebebeb; color: #777; }
.admin-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.admin-card-actions button {
  flex: 1;
  padding: 6px;
  font-size: 12px;
  border-radius: 12px;
}
.move-card-btn { width: 100%; margin-top: 7px; padding: 7px 10px; border: 1.5px solid #3194be; border-radius: 12px; background: #e8f7fd; color: #1e6e8e; font-weight: 800; cursor: pointer; }
.move-card-btn:hover { background: #d5f1fc; }

/* CARD EDITOR MODAL */
.admin-dialog {
  max-height: 90vh;
  overflow-y: auto;
}
.admin-dialog .detail-body {
  padding: 24px;
}
.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.switch-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}
.version-control {
  margin: 0;
  border: 2px solid;
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 10px;
}
.card-state-control { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; border: 2px solid #c7a95e; border-radius: 16px; background: #fff8e6; }
.card-state-control legend { padding: 0 8px; font: 800 16px var(--font-game); }
.version-control legend {
  padding: 0 8px;
  font: 16px var(--font-game);
  font-weight: 800;
}
.global-control { border-color: #f39a37; background: #fff5e6; }
.vng-control { border-color: #54b8e6; background: #edf8fc; }

/* LOGIN BOX */
.login-box {
  max-width: 440px;
  margin: 12vh auto;
  text-align: center;
}
.login-box h1 {
  font: 26px var(--font-game);
  color: #fff;
  paint-order: stroke fill;
  -webkit-text-stroke: 1.4px #3d2b1f;
  text-shadow: 0 2.5px 0 #3d2b1f;
  margin: 0 0 16px;
}
/* TOAST */
#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  background: #3a332f;
  color: white;
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateY(15px);
  transition: all .2s ease;
  z-index: 100;
  pointer-events: none;
}
#toast.show {
  opacity: 1;
  transform: none;
}

/* NOTIFICATION PAGE */
.notification-page { max-width: 980px; margin-inline: auto; }
.notice-hero {
  height: 270px;
  overflow: hidden;
  padding: 26px 30px;
  border: 4px solid var(--gold);
  border-radius: 28px;
  background: rgba(255,240,193,.98);
  box-shadow: 0 4px 0 var(--card-shadow);
}
.notice-hero h1 { margin: 0 0 14px; font: 800 30px var(--font-game); color: #fff; paint-order: stroke fill; -webkit-text-stroke: 1.4px #3d2b1f; text-shadow: 0 2.5px 0 #3d2b1f; }
.notice-scroll-copy { height: 176px; overflow-y: auto; white-space: pre-wrap; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.56); color: #4d3b34; font-size: 16px; line-height: 1.55; font-weight: 600; scrollbar-color: #d5a839 transparent; }
.notice-carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 32%); gap: 16px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: inline mandatory; padding: 22px 2px 16px; scrollbar-color: #efd16f transparent; }
.notice-card { scroll-snap-align: start; min-width: 0; padding: 12px; border: 3px solid var(--gold); border-radius: 24px; background: var(--cream); box-shadow: 0 4px 0 var(--card-shadow); }
.notice-card h2 { margin: 2px 4px 10px; min-height: 48px; font: 800 18px/1.3 var(--font-game); color: #493833; }
.notice-card > img, .notice-placeholder { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; object-position: center; border: 1.5px solid #e1be65; border-radius: 16px; background: #fff; color: #a48332; font-weight: 800; }
.notice-card p { height: 62px; overflow: hidden; margin: 10px 5px; color: #5b443a; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.notice-more { width: 100%; padding: 10px; border: 0; border-radius: 18px; background: var(--sky); color: #fff; box-shadow: inset 0 -4px rgba(46,124,155,.3); font-weight: 800; cursor: pointer; }
.about-button { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-top: 10px; padding: 18px 22px; border: 3px solid var(--gold); border-radius: 23px; background: var(--cream); color: #493833; box-shadow: 0 4px 0 var(--card-shadow); text-align: left; cursor: pointer; }
.about-button span { font-size: 14px; color: #806a5b; }
.about-button strong { font-size: 18px; }
.about-button b { font-size: 30px; }
.notice-detail > img { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: none; object-fit: contain; object-position: center; border-radius: 18px; background: #fff; border: 2px solid #e7cd82; }
.notice-detail-copy { max-height: 310px; overflow-y: auto; margin: 16px 0; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.58); white-space: pre-wrap; font-size: 16px; line-height: 1.55; }
.notice-link { display: inline-flex; text-decoration: none; }
.admin-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.admin-section-title h2 { margin: 0; }
.admin-notice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.upload-box input[type="file"], .field input[type="file"] { display: block; width: 100%; padding: 9px; border: 1.5px dashed #d8b75c; border-radius: 12px; background: #fff; cursor: pointer; }

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1050px) {
  .rightbar { display: none; }
  .page { margin-right: 0; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .22s ease;
    width: 250px;
  }
  .sidebar.open {
    transform: none;
  }
  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 19;
    border: 0;
    background: rgba(23,32,40,.55);
    backdrop-filter: blur(2px);
  }
  .sidebar-scrim.open { display: block; }
  .mobile-menu {
    left: 12px;
    top: 18px;
    width: 42px;
    height: 42px;
    border: 2px solid var(--gold);
    border-radius: 14px;
    font-size: 22px;
    box-shadow: 0 3px 0 var(--card-shadow);
  }
  .mobile-menu[aria-expanded="true"] { left: 240px; top: 24px; width: 34px; height: 42px; border-radius: 13px; font-size: 25px; }
  body.menu-collapsed .page { margin-left: 0; }
  .page {
    margin: 0;
    padding: 70px 14px 24px;
  }
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .code-card {
    border-width: 3.5px;
    border-radius: 22px;
    padding: 8px;
  }
  .code-card h3 {
    font-size: 14px;
    min-height: 36px;
  }
  .version-tag {
    font-size: 11.5px;
    padding: 3px 6px;
  }
  .card-action {
    font-size: 16px;
    padding: 7px;
  }
  .chat-intro {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .chat-intro img {
    max-width: 160px;
    margin: 0 auto;
  }
  .detail-main {
    grid-template-columns: 1fr;
  }
  .detail-main > img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 240px;
    object-fit: contain;
  }
  .version-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .version-action { min-width: 0; min-height: 52px; padding: 8px 5px; }
  .version-action strong { font-size: 15px; white-space: nowrap; }
  .notice-hero { height: 250px; padding: 20px 16px; }
  .notice-scroll-copy { height: 166px; }
  .notice-carousel { grid-auto-columns: minmax(235px, 80%); }
  .chat-form { flex-wrap: wrap; }
  .chat-head { gap: 9px; }
  .dynamic-island { max-width: 58vw; }
  .chat-head small { flex: 0 1 auto; padding-inline: 8px; text-align: center; }
  .chat-form > input { flex-basis: calc(100% - 100px); }
  .chat-form .primary-button { flex: 1 0 100%; }
  .chat-media.is-sticker { width: 70px; height: 70px; }
  .card-state-control { grid-template-columns: 1fr; }
  .form-grid, .upload-grid {
    grid-template-columns: 1fr;
  }
  .span-2 { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .dynamic-island, .dynamic-island *, .dynamic-island::after { animation: none !important; transition-duration: .01ms !important; }
  .chat-island, .island-panel, .chat-reveal, .chat-reveal.is-open { animation: none !important; transition: none !important; transform: none !important; filter: none !important; }
  .island-hello path { animation: none !important; stroke-dashoffset: 0; opacity: 1; }
}

@media (max-width: 430px) {
  .island-stage { margin-top: 18px; }
  .chat-island { border-radius: 28px; }
  .island-entry { padding: 14px 12px; }
  .island-entry-row { gap: 6px; }
  .island-entry > label { font-size: 12px; }
  .island-entry button { padding: 10px; font-size: 12px; }
}

@media (max-width: 420px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .code-card {
    padding: 6px;
    border-radius: 18px;
  }
  .code-card h3 {
    font-size: 13px;
  }
}
