/* Cellgrids Arcade */
.ag-page { max-width: 1120px; margin: 0 auto; padding: 14px 16px 50px; }
.ag-crumb { font-size: 13px; color: var(--ink-soft, #5a6b62); margin: 6px 0 10px; }
.ag-crumb a { color: #1E6B41; text-decoration: none; }
.ag-h1 { font: 700 30px/1.15 'Cormorant Garamond', Georgia, serif; margin: 0 0 4px; color: #17391f; }
.ag-lead { font-size: 14px; color: #55655b; margin: 0 0 12px; }
#ag { position: relative; }
.ag-stage { position: relative; margin: 0 auto; background: #0b1d14; border-radius: 16px; overflow: hidden; box-shadow: 0 14px 40px rgba(10, 40, 24, .35); user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.ag-stage canvas { display: block; }
.ag-stage:fullscreen { border-radius: 0; display: flex; align-items: center; justify-content: center; background: #000; width: 100% !important; height: 100% !important; }
.ag-top { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; z-index: 3; }
.ag-top button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(10, 30, 20, .55); color: #fff; font-size: 16px; cursor: pointer; backdrop-filter: blur(4px); }
.ag-top button:hover { background: rgba(33, 115, 70, .8); }
.ag-ui { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; z-index: 2; background: radial-gradient(ellipse at center, rgba(6, 20, 13, .35), rgba(6, 20, 13, .82)); }
.ag-ui.on { display: flex; animation: agFade .3s ease; }
@keyframes agFade { from { opacity: 0; } to { opacity: 1; } }
.ag-panel { text-align: center; color: #fff; padding: 1.2em 1.4em; max-width: 92%; }
.ag-title { font: 700 3.2em/1.05 'Cormorant Garamond', Georgia, serif; text-shadow: 0 3px 18px rgba(0, 0, 0, .6); margin-bottom: .25em; }
.ag-how { font-size: 1.15em; opacity: .92; margin: .2em auto .7em; max-width: 30em; line-height: 1.45; }
.ag-sub { font-size: 1.1em; opacity: .9; margin: .2em 0 .8em; }
.ag-hint { font-size: .9em; opacity: .65; margin-top: .6em; }
.ag-btn { background: linear-gradient(#ffd84d, #f0b400); color: #2b2100; border: 0; border-radius: 999px; padding: .65em 1.5em; font: 800 1.15em Inter, Arial, sans-serif; cursor: pointer; box-shadow: 0 5px 0 #a87c00, 0 10px 22px rgba(0, 0, 0, .35); transition: transform .1s; }
.ag-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #a87c00; }
.ag-btn.big { font-size: 1.6em; padding: .55em 1.8em; animation: agPulse 1.6s ease-in-out infinite; }
.ag-btn.ghost { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .5) inset; }
@keyframes agPulse { 50% { transform: scale(1.05); } }
.ag-over-t { font: 700 1.9em 'Cormorant Garamond', Georgia, serif; color: #ffe27a; }
.ag-score { font: 800 4.2em/1 Inter, Arial, sans-serif; text-shadow: 0 4px 20px rgba(0, 0, 0, .5); }
.ag-save { font-size: 1em; margin: .7em 0 1em; min-height: 1.3em; }
.ag-save a { color: #ffe27a; font-weight: 800; }
.ag-btns { display: flex; gap: .7em; justify-content: center; flex-wrap: wrap; }
.ag-more { margin-top: 1.1em; font-size: .95em; opacity: .95; display: flex; gap: .6em; justify-content: center; flex-wrap: wrap; align-items: center; }
.ag-more span { opacity: .75; }
.ag-more a { color: #fff; background: rgba(255, 255, 255, .15); padding: .25em .8em; border-radius: 999px; text-decoration: none; font-weight: 700; }
.ag-more a:hover { background: rgba(255, 255, 255, .3); }
.ag-toast { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 4; background: rgba(15, 42, 28, .92); color: #fff; border: 1px solid #ffd23f; border-radius: 999px; padding: 7px 8px 7px 16px; display: flex; gap: 10px; align-items: center; font-size: 13px; max-width: 94%; animation: agDrop .4s ease; }
.ag-toast a { background: #ffd23f; color: #2b2100; padding: 4px 12px; border-radius: 999px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.ag-toast button { background: none; border: 0; color: #fff; font-size: 18px; cursor: pointer; }
@keyframes agDrop { from { opacity: 0; transform: translate(-50%, -14px); } }
.ag-touch { display: none; }
@media (pointer: coarse) {
  .ag-touch { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 6px 0; margin: 0 auto; max-width: 560px; }
  .ag-touch:empty { display: none; }
}
.ag-tb { flex: 1; height: 58px; border-radius: 16px; border: 2px solid #1E6B41; background: linear-gradient(#e9fbef, #c9efd8); color: #145a35; font-size: 26px; font-weight: 800; touch-action: none; box-shadow: 0 4px 0 #1E6B41; }
.ag-tb.on { transform: translateY(3px); box-shadow: 0 1px 0 #1E6B41; background: #a9e5c1; }
.ag-tb { min-width: 0; padding: 0; }
.ag-tb.sm { flex: 1.15; font-size: 14px; }
.ag-board { max-width: 560px; margin: 18px auto 0; background: #fff; border: 1px solid #d6e3da; border-radius: 14px; padding: 12px 16px; }
.ag-bh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ag-bh button { border: 1px solid #c4d6ca; background: #f3f8f5; border-radius: 999px; padding: 3px 12px; font-size: 12px; cursor: pointer; margin-left: 4px; }
.ag-bh button.on { background: #217346; color: #fff; border-color: #217346; }
.ag-board ol { list-style: none; margin: 0; padding: 0; }
.ag-board li { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid #eef3f0; font-size: 14px; align-items: center; }
.ag-board li i { width: 22px; font-style: normal; font-weight: 800; color: #1E6B41; }
.ag-board li span { flex: 1; }
.ag-bn { font-size: 13px; color: #6b7c72; margin: 8px 0; }
.ag-info { max-width: 760px; margin: 26px auto 0; font-size: 15px; line-height: 1.7; color: #2c3a32; }
.ag-info h2 { font: 700 22px 'Cormorant Garamond', Georgia, serif; margin: 18px 0 6px; }
.ag-others { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 24px auto 0; max-width: 1000px; }
.ag-others a { display: block; padding: 14px; border-radius: 12px; background: #f3f8f5; border: 1px solid #d6e3da; text-decoration: none; color: #17391f; font-weight: 700; font-size: 14px; }
.ag-others a:hover { border-color: #217346; transform: translateY(-2px); }
.ag-promo { max-width: 760px; margin: 22px auto 0; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ag-promo a { padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; text-decoration: none; background: #217346; color: #fff; }
.ag-promo a.o { background: #fff; color: #217346; border: 2px solid #217346; }

/* hub */
.ah-hero { position: relative; border-radius: 20px; overflow: hidden; padding: 38px 24px 30px; text-align: center; color: #fff; background: linear-gradient(135deg, #0b2a1a, #1d6b3f 60%, #0e3b26); }
.ah-hero:before { content: ""; position: absolute; inset: -50%; background: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0/48px 48px, linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0/48px 48px; transform: perspective(500px) rotateX(55deg); animation: ahGrid 6s linear infinite; }
@keyframes ahGrid { to { background-position: 0 48px, 48px 0; } }
.ah-hero h1 { position: relative; font: 700 44px/1.05 'Cormorant Garamond', Georgia, serif; margin: 0 0 8px; text-shadow: 0 4px 24px rgba(0, 0, 0, .4); }
.ah-hero p { position: relative; margin: 0 auto; max-width: 560px; font-size: 16px; opacity: .92; }
.ah-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin: 24px 0; }
.ah-card { position: relative; display: block; border-radius: 20px; overflow: hidden; text-decoration: none; color: #fff; background: #0b1d14; box-shadow: 0 10px 28px rgba(10, 40, 24, .28); transition: transform .25s, box-shadow .25s; }
.ah-card:hover { transform: translateY(-6px) scale(1.01); box-shadow: 0 18px 40px rgba(10, 40, 24, .45); }
.ah-card canvas { display: block; width: 100%; height: 190px; }
.ah-body { padding: 14px 16px 16px; background: linear-gradient(#10281b, #0b1d14); }
.ah-body b { display: block; font-size: 19px; margin-bottom: 3px; }
.ah-body span { display: block; font-size: 13px; opacity: .82; line-height: 1.45; min-height: 38px; }
.ah-play { display: inline-block; margin-top: 10px; background: linear-gradient(#ffd84d, #f0b400); color: #2b2100; font-weight: 800; padding: 8px 20px; border-radius: 999px; box-shadow: 0 3px 0 #a87c00; }
.ah-tag { position: absolute; top: 10px; left: 10px; background: rgba(0, 0, 0, .5); padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.ah-top { margin-top: 8px; font-size: 12px; opacity: .85; }
@media (max-width: 600px) { .ag-h1 { font-size: 25px; } .ah-hero h1 { font-size: 32px; } .ag-page { padding: 10px 10px 40px; } }

/* Guess the Formula (DOM game) */
.ag-dom { background: linear-gradient(160deg, #0b2a1a, #12452b); width: 100% !important; max-width: 520px; height: auto !important; padding: 18px 14px 20px; color: #fff; }
.gf-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.gf-top b { font: 700 24px 'Cormorant Garamond', Georgia, serif; }
.gf-top span { font-size: 12px; opacity: .75; }
.gf-grid { display: grid; gap: 7px; margin: 0 auto 14px; width: min(100%, 320px); }
.gf-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.gf-t { aspect-ratio: 1; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .22); display: flex; align-items: center; justify-content: center; font: 800 28px Inter, Arial, sans-serif; text-transform: uppercase; background: rgba(255, 255, 255, .05); transition: transform .12s; perspective: 400px; }
.gf-t.f { border-color: rgba(255, 255, 255, .6); transform: scale(1.06); }
.gf-t.rv { animation: gfFlip .55s ease both; }
@keyframes gfFlip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
.gf-t.g { background: #1f9a52; border-color: #1f9a52; } .gf-t.y { background: #c9a227; border-color: #c9a227; } .gf-t.x { background: #3b4a42; border-color: #3b4a42; }
.gf-row.sh { animation: gfShake .4s; } @keyframes gfShake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-5px); } }
.gf-win .gf-t { animation: gfJump .5s ease both; } @keyframes gfJump { 40% { transform: translateY(-14px); } }
.gf-msg { min-height: 24px; text-align: center; font-size: 14px; font-weight: 700; color: #ffe27a; margin-bottom: 8px; }
.gf-hint { text-align: center; font-size: 13px; opacity: .85; margin-bottom: 8px; min-height: 18px; }
.gf-kb { display: grid; gap: 6px; }
.gf-kr { display: flex; gap: 5px; justify-content: center; }
.gf-k { flex: 1; max-width: 42px; height: 50px; border-radius: 8px; border: 0; background: #2c4a3a; color: #fff; font: 700 15px Inter, Arial, sans-serif; cursor: pointer; text-transform: uppercase; }
.gf-k.w { max-width: 64px; font-size: 12px; }
.gf-k.g { background: #1f9a52; } .gf-k.y { background: #c9a227; } .gf-k.x { background: #16241d; color: #7d8f85; }
.gf-end { text-align: center; margin-top: 12px; }
.gf-end .ag-score { font-size: 3em; } .gf-end .ag-btn { font-size: 1em; }
.gf-end .ag-save a { color: #ffe27a; }
.gf-banner { text-align: center; font-size: 13px; background: rgba(255, 210, 63, .15); border: 1px solid #ffd23f; border-radius: 10px; padding: 8px; margin-bottom: 10px; }
.gf-banner a { color: #ffe27a; font-weight: 800; }

/* desktop layout: board left, stage centre, how-to right */
.ag-layout { display: block; }
.ag-l, .ag-r { min-width: 0; }
@media (min-width: 1000px) {
  .ag-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 250px; gap: 22px; align-items: start; }
  .ag-layout .ag-c { order: 2; } .ag-layout .ag-l { order: 1; } .ag-layout .ag-r { order: 3; }
  .ag-layout .ag-board { margin: 0; max-width: none; }
  .ag-layout .ag-info { margin: 0; max-width: none; font-size: 14px; background: #fff; border: 1px solid #d6e3da; border-radius: 14px; padding: 6px 16px 14px; }
  .ag-layout .ag-info h2 { font-size: 20px; }
}
@media (min-width: 1000px) and (max-width: 1180px) { .ag-layout { grid-template-columns: 200px minmax(0, 1fr) 200px; gap: 16px; } }

/* bigger stage on laptops / desktops */
@media (min-width: 1000px) {
  .ag-page { max-width: 1500px; padding-top: 8px; }
  .ag-layout { grid-template-columns: 230px minmax(0, 1fr) 230px; gap: 20px; }
  .ag-crumb { margin: 2px 0 2px; }
  .ag-h1 { font-size: 26px; margin: 0 0 2px; line-height: 1.15; }
  .ag-lead { margin: 0 0 8px; font-size: 13px; }
}
@media (min-width: 1000px) and (max-width: 1180px) { .ag-layout { grid-template-columns: 190px minmax(0, 1fr) 190px; gap: 14px; } }

/* clean game screen: one column, stage as big as possible, details below */
@media (min-width: 1000px) {
  .ag-layout, .ag-layout { display: block !important; }
  .ag-layout .ag-l, .ag-layout .ag-r { max-width: 760px; margin: 18px auto 0; }
  .ag-layout .ag-info { font-size: 15px; }
}
.ag-top a { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(10, 30, 20, .55); color: #fff; font-size: 15px; display: flex; align-items: center; justify-content: center; text-decoration: none; backdrop-filter: blur(4px); }
.ag-top a:hover { background: rgba(190, 50, 50, .85); }
.ag-top { gap: 5px; }
.ag-panel.help .ag-how { text-align: left; max-width: 26em; font-size: 1.05em; }
.ag-panel.help .ag-how b { color: #ffe27a; }
.ag-panel.help { background: rgba(8, 20, 14, .93) !important; }

/* ===== GAMING THEME (dark mode, toggle on page) ===== */
@keyframes agGlow { from { box-shadow: 0 0 0 2px rgba(0, 230, 255, .55), 0 0 22px rgba(0, 230, 255, .4), 0 0 70px rgba(130, 70, 255, .3), 0 24px 60px rgba(0, 0, 0, .6); } to { box-shadow: 0 0 0 2px rgba(255, 90, 220, .6), 0 0 26px rgba(255, 90, 220, .45), 0 0 80px rgba(0, 230, 255, .32), 0 24px 60px rgba(0, 0, 0, .6); } }
html.ag-dark body:has(.ag-page) { background: radial-gradient(1200px 600px at 50% -10%, #12306a 0%, rgba(18, 48, 106, 0) 60%), radial-gradient(900px 500px at 100% 30%, rgba(160, 50, 220, .22), rgba(160, 50, 220, 0) 60%), radial-gradient(900px 500px at 0% 40%, rgba(0, 220, 170, .16), rgba(0, 220, 170, 0) 60%), #060a18 !important; color: #dfe9ff; }
html.ag-dark body:has(.ag-page) .ag-page { position: relative; }
html.ag-dark body:has(.ag-page) .ag-page::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; background: linear-gradient(rgba(120, 180, 255, .045) 1px, transparent 1px) 0 0 / 42px 42px, linear-gradient(90deg, rgba(120, 180, 255, .045) 1px, transparent 1px) 0 0 / 42px 42px; }
html.ag-dark body:has(.ag-page) .ag-page > * { position: relative; z-index: 1; }
html.ag-dark .ag-crumb, html.ag-dark .ag-crumb a { color: #7fb0ff; }
html.ag-dark .ag-h1 { font: 900 30px/1.1 Inter, Arial, sans-serif; letter-spacing: 2px; text-transform: uppercase; color: #fff; text-shadow: 0 0 18px rgba(0, 220, 255, .65), 0 0 40px rgba(130, 80, 255, .45); }
html.ag-dark .ag-lead { color: #9fb4de; }
html.ag-dark .ag-stage { border-radius: 18px; background: #050914; box-shadow: 0 0 0 2px rgba(0, 230, 255, .55), 0 0 22px rgba(0, 230, 255, .45), 0 0 70px rgba(130, 70, 255, .35), 0 24px 60px rgba(0, 0, 0, .6); animation: agGlow 5s ease-in-out infinite alternate; }
html.ag-dark .ag-stage:fullscreen { box-shadow: none; animation: none; }
html.ag-dark .ag-top button, html.ag-dark .ag-top a { background: rgba(8, 14, 34, .72); border: 1px solid rgba(0, 230, 255, .5); color: #bff6ff; box-shadow: 0 0 10px rgba(0, 230, 255, .25); }
html.ag-dark .ag-top button:hover { background: rgba(0, 150, 200, .6); }
html.ag-dark .ag-top a:hover { background: rgba(230, 50, 120, .8); }
html.ag-dark .ag-btn { background: linear-gradient(#35f0c0, #12b88f); color: #02231c; box-shadow: 0 4px 0 #0a7a60, 0 0 22px rgba(53, 240, 192, .55); text-transform: uppercase; letter-spacing: 1px; }
html.ag-dark .ag-btn.big { font-weight: 900; }
html.ag-dark .ag-title { font: 900 2.6em/1.05 Inter, Arial, sans-serif; letter-spacing: 3px; text-transform: uppercase; text-shadow: 0 0 20px rgba(0, 230, 255, .8), 0 0 50px rgba(150, 80, 255, .6); }
html.ag-dark .ag-panel { background: radial-gradient(circle at 50% 30%, rgba(20, 40, 90, .82), rgba(4, 8, 22, .92)) !important; }
html.ag-dark .ag-panel.help { background: rgba(5, 10, 26, .95) !important; }
html.ag-dark .ag-tb { background: linear-gradient(#1b2a5c, #0f1a40); color: #bff6ff; border: 2px solid #00e0ff; box-shadow: 0 4px 0 #006f86, 0 0 14px rgba(0, 224, 255, .35); }
html.ag-dark .ag-tb.on { background: #0b6a86; box-shadow: 0 1px 0 #006f86, 0 0 20px rgba(0, 224, 255, .6); }
html.ag-dark .ag-board, html.ag-dark .ag-layout .ag-info, html.ag-dark .ag-info { background: rgba(10, 18, 44, .85) !important; border: 1px solid rgba(0, 230, 255, .3) !important; box-shadow: 0 0 24px rgba(0, 200, 255, .12); color: #cfdcf7; border-radius: 16px; backdrop-filter: blur(4px); }
html.ag-dark .ag-info { padding: 8px 20px 18px; }
html.ag-dark .ag-info h2, html.ag-dark .ag-board h2, html.ag-dark .ag-board h3 { color: #fff; font: 800 18px Inter, Arial, sans-serif; letter-spacing: 1.5px; text-transform: uppercase; }
html.ag-dark .ag-info h3 { color: #9fe8ff; }
html.ag-dark .ag-board li { border-bottom-color: rgba(120, 170, 255, .18); color: #dfe9ff; }
html.ag-dark .ag-board li i { color: #35f0c0; }
html.ag-dark .ag-others a { background: rgba(12, 22, 54, .85); border: 1px solid rgba(0, 230, 255, .3); color: #fff; }
html.ag-dark .ag-others a small { color: #8fb0e8 !important; }
html.ag-dark .ag-others a:hover { border-color: #ff5adc; box-shadow: 0 0 18px rgba(255, 90, 220, .4); }
html.ag-dark .ag-promo a { background: linear-gradient(#35f0c0, #12b88f); color: #02231c; }
html.ag-dark .ag-promo a.o { background: transparent; color: #35f0c0; border-color: #35f0c0; }
html.ag-dark body:has(.ag-page) h2.ag-h1 { font-size: 20px; }
html.ag-dark .ah-hero { background: radial-gradient(circle at 50% 0, #1a3a8a, #0a1030 70%) !important; box-shadow: 0 0 0 2px rgba(0, 230, 255, .4), 0 0 40px rgba(130, 70, 255, .35); }
html.ag-dark .ah-card { background: #0a1030; box-shadow: 0 0 0 1px rgba(0, 230, 255, .35), 0 10px 30px rgba(0, 0, 0, .5); }
html.ag-dark .ah-card:hover { box-shadow: 0 0 0 2px #ff5adc, 0 0 30px rgba(255, 90, 220, .5); }
html.ag-dark .ah-body { background: linear-gradient(#0e1a4a, #080e28); }
.ag-theme { position: absolute; right: 16px; top: 8px; z-index: 5; padding: 6px 12px; border-radius: 999px; font: 700 12px Inter, Arial, sans-serif; cursor: pointer; border: 1px solid #1E6B41; background: #fff; color: #145a35; }
html.ag-dark .ag-theme { background: rgba(8, 14, 34, .8); color: #bff6ff; border-color: rgba(0, 230, 255, .55); box-shadow: 0 0 12px rgba(0, 230, 255, .3); }
.ag-page { position: relative; }
.ag-back { position: absolute; left: 8px; top: 8px; z-index: 7; width: 38px; height: 38px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, .45); background: rgba(10, 30, 20, .8); color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.ag-back:hover { background: rgba(190, 50, 50, .9); }
html.ag-dark .ag-back { background: rgba(8, 14, 34, .85); border-color: rgba(0, 230, 255, .6); color: #bff6ff; box-shadow: 0 0 12px rgba(0, 230, 255, .35); }
.ag-l, #agBoard { display: none !important; }
html.ag-dark body:has(.ag-page) .ag-page > .ag-theme, .ag-page > .ag-theme { position: absolute; }

/* ===== v8: clean top, hover icons, start popup ===== */
.ag-page { padding-top: 6px; }
.ag-top .ag-theme.in { position: static !important; width: 34px; height: 34px; padding: 0; border-radius: 10px; font-size: 16px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, .35); background: rgba(10, 30, 20, .55); color: #fff; box-shadow: none; }
html.ag-dark .ag-top .ag-theme.in { background: rgba(8, 14, 34, .72); border-color: rgba(0, 230, 255, .5); color: #bff6ff; }
@media (hover: hover) {
  .ag-top { opacity: .16; transition: opacity .25s; }
  .ag-stage:hover .ag-top, .ag-top:hover, .ag-top:focus-within { opacity: 1; }
}
.ag-panel.ready { max-height: 94%; overflow: auto; padding: 1.1em 1.4em; width: min(92%, 36em); border-radius: 18px; }
.ag-panel.ready .ag-title { font-size: 2.2em; margin-bottom: .1em; }
.ag-about { font-size: 1.05em; opacity: .92; margin: .1em 0 .7em; line-height: 1.4; }
.ag-hbox { text-align: left; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; padding: .6em 1em .7em; margin: 0 auto .8em; }
.ag-hbox .ag-hh { font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; font-size: .8em; opacity: .8; margin-bottom: .25em; }
.ag-hbox .ag-how { font-size: 1em; margin: 0; max-width: none; }
.ag-hbox .ag-how b { color: #ffe27a; }
.ag-panel.ready { padding-top: 2.6em; }
@media (max-width: 700px) {
  .ag-top { top: 5px; right: 5px; gap: 3px; }
  .ag-top button, .ag-top a, .ag-top .ag-theme.in { width: 22px !important; height: 22px !important; font-size: 11px !important; border-radius: 7px !important; }
}

.ag-top { position: absolute; }
.ag-snd { position: absolute; top: 46px; right: 0; z-index: 6; min-width: 210px; padding: 10px 12px; border-radius: 12px; background: rgba(10, 16, 36, .94); border: 1px solid rgba(0, 230, 255, .45); box-shadow: 0 8px 26px rgba(0, 0, 0, .5); display: flex; flex-direction: column; gap: 8px; }
.ag-snd[hidden] { display: none; }
.ag-snd label { display: flex; align-items: center; gap: 8px; color: #e8f6ff; font: 600 14px Inter, Arial, sans-serif; cursor: pointer; }
.ag-snd input { width: 18px; height: 18px; accent-color: #00d4ff; }
@media (hover: hover) { .ag-top:has(.ag-snd:not([hidden])) { opacity: 1 !important; } }

.ag-meta { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: .5em 0 .7em; }
.ag-meta span { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: .25em .7em; font-size: .78em; font-weight: 700; }
.ag-stars { font-size: 2.6em; line-height: 1; letter-spacing: .08em; margin: .1em 0; }
.ag-stars span { color: rgba(255, 255, 255, .22); display: inline-block; }
.ag-stars span.on { color: #ffd84d; text-shadow: 0 0 14px rgba(255, 200, 40, .8); animation: agStar .5s cubic-bezier(.2, 1.8, .4, 1) both; }
@keyframes agStar { 0% { transform: scale(0) rotate(-40deg); } 100% { transform: scale(1) rotate(0); } }
.ag-quip { font-weight: 700; font-size: 1.02em; margin: .2em 0 .5em; opacity: .95; }
.ag-up { display: inline-block; background: linear-gradient(#ffe07a, #f2b134); color: #3a2400; font-weight: 800; border-radius: 999px; padding: .3em .9em; margin: .25em 0; animation: agPop .5s cubic-bezier(.2, 1.8, .4, 1) both; }
@keyframes agPop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.ag-rank { display: flex; align-items: center; justify-content: center; gap: 8px; margin: .4em 0; font-size: .85em; flex-wrap: wrap; }
.ag-rank i { width: 120px; height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .2); overflow: hidden; display: inline-block; }
.ag-rank u { display: block; height: 100%; background: linear-gradient(90deg, #6cf0a2, #ffd84d); }
.ag-rank small { opacity: .8; }
.ag-miss { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: .3em 0 .5em; font-size: .72em; }
.ag-miss span { border: 1px dashed rgba(255, 255, 255, .35); border-radius: 8px; padding: .2em .55em; opacity: .85; }
.ag-miss span.on { border-style: solid; border-color: #6cf0a2; color: #9dffc4; opacity: 1; }
.ag-try { display: inline-block; margin: .2em 0 .6em; color: #8ae6ff; font-weight: 700; font-size: .9em; text-decoration: none; }
.ag-try:hover { text-decoration: underline; }

.ag-cameo { position: absolute; z-index: 5; width: 22%; max-width: 120px; min-width: 70px; cursor: pointer; transition: transform .35s cubic-bezier(.2, 1.4, .4, 1), opacity .3s; opacity: 0; touch-action: manipulation; }
.ag-cameo canvas { width: 100%; display: block; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4)); }
.ag-cameo.l { left: 0; transform: translateX(-110%); } .ag-cameo.r { right: 0; transform: translateX(110%); }
.ag-cameo.in { opacity: 1; transform: translateX(0); } .ag-cameo.out { opacity: 0; } .ag-cameo.boop canvas { animation: agBoop .4s; }
.ag-cameo span { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: #fff; color: #222; border-radius: 10px; padding: 3px 8px; font: 700 12px Inter, Arial, sans-serif; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
@keyframes agBoop { 0% { transform: scale(1); } 40% { transform: scale(1.3, .7); } 100% { transform: scale(1); } }

.ag-pad { align-items: center !important; justify-content: space-between !important; gap: 14px !important; max-width: 620px !important; padding: 12px 14px 0 !important; }
.ag-joy { position: relative; width: 132px; height: 132px; flex: none; touch-action: none; user-select: none; -webkit-user-select: none; }
.ag-joy svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ag-joy .cr { fill: rgba(10,22,40,.55); stroke: rgba(255,255,255,.85); stroke-width: 2.2; stroke-linejoin: round; }
.ag-joy .ar { fill: rgba(255,255,255,.55); }
.ag-joy.k-u .ar.u, .ag-joy.k-d .ar.d, .ag-joy.k-l .ar.l, .ag-joy.k-r .ar.r { fill: #ffd84d; }
.ag-face { position: relative; width: 150px; height: 132px; flex: none; }
.ag-fb { position: absolute; width: 62px; height: 62px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.88); background: rgba(10,22,40,.55); color: #fff; font-size: 11px; font-weight: 800; line-height: 1.05; padding: 0; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.ag-fb.on { background: rgba(255,216,77,.85); color: #3a2a00; transform: translateY(2px); box-shadow: none; }
.ag-face.n4 .ag-fb:nth-child(1) { left: 4px; top: 4px; } .ag-face.n4 .ag-fb:nth-child(2) { right: 4px; top: 4px; } .ag-face.n4 .ag-fb:nth-child(3) { left: 4px; bottom: 4px; } .ag-face.n4 .ag-fb:nth-child(4) { right: 4px; bottom: 4px; }
.ag-face.n1 .ag-fb { right: 18px; top: 34px; width: 74px; height: 74px; }
.ag-stage.ag-pfs { position: fixed !important; inset: 0; z-index: 2147483000; width: 100vw !important; height: 100vh !important; height: 100dvh !important; border-radius: 0 !important; display: flex; align-items: center; justify-content: center; background: #000; }
html.ag-pfs-on, html.ag-pfs-on body { overflow: hidden; }
@media (pointer: coarse) {
  .ag-touch.ag-ov { display: flex !important; position: absolute; left: 0; right: 0; bottom: 0; max-width: none !important; padding: 0 14px 10px !important; margin: 0; pointer-events: none; z-index: 7; opacity: .82; }
  .ag-touch.ag-ov > * { pointer-events: auto; }
}
html.ag-pfs-on nav, html.ag-pfs-on header, html.ag-pfs-on .site-nav, html.ag-pfs-on #chatBtn, html.ag-pfs-on .cw-btn { display: none !important; }
html.ag-pfs-on .mainnav, html.ag-pfs-on #chatFloatBtn, html.ag-pfs-on .cs-chat-icon-btn, html.ag-pfs-on [id*="chat" i]:not(#agStage):not(.ag-stage) { display: none !important; }
html.ag-pfs-on .topbar, html.ag-pfs-on .topbar-inner { display: none !important; }

.ag-panel.ready, .ag-panel.help, .ag-panel.over { max-height: none !important; overflow: visible !important; }
.ag-ui { overflow: hidden; }

.ag-stage:fullscreen, .ag-stage.ag-pfs { background: #0a1124 !important; }
