/* Hadal: Terms of Service text and the agree screen shown before the app. */

/* ---------- terms text (agree screen and terms.html) */
.terms-title { margin: 0 0 4px; font: 700 20px/1.2 var(--display, 'Unbounded', sans-serif); letter-spacing: -0.01em; color: #eef2fb; }
.terms-date { margin: 0 0 18px; color: #8d9ab8; font-size: 13px; }
.terms-sec { margin: 0 0 18px; }
.terms-sec h2 { margin: 0 0 8px; font: 700 15px/1.35 var(--body, 'Figtree', sans-serif); color: #eef2fb; }
.terms-sec p { margin: 0 0 8px; }
.terms-sec ul { margin: 0; padding-left: 20px; }
.terms-sec li { margin: 0 0 7px; padding-left: 2px; }
.terms-sec li::marker { color: #6c8cff; }
.terms-sec b { color: #eef2fb; }
.terms-sec a, .terms-end a { color: #8fa8ff; }
.terms-end { margin: 22px 0 4px; color: #5f6b88; font-size: 13px; }

/* ---------- agree screen */
body.gated { overflow: hidden; }
.gate { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 76px 24px 28px; background: radial-gradient(1100px 520px at 50% -10%, rgba(52, 78, 170, 0.32), transparent 65%), rgba(4, 7, 15, 0.94); backdrop-filter: blur(10px); animation: gate-in 0.35s ease both; }
.gate.leaving { animation: gate-out 0.36s ease forwards; pointer-events: none; }
@keyframes gate-in { from { opacity: 0; } }
@keyframes gate-out { to { opacity: 0; } }
.gate-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; }
.gate-brand { display: inline-flex; align-items: center; gap: 9px; color: #eef2fb; text-decoration: none; font: 700 19px var(--display, 'Unbounded', sans-serif); letter-spacing: -0.02em; }
.gate-card { width: min(800px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 14px; padding: 26px 28px 22px; border-radius: 18px; background: rgba(11, 16, 30, 0.92); border: 1px solid rgba(132, 152, 200, 0.18); box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55); animation: gate-card 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; }
@keyframes gate-card { from { opacity: 0; transform: translateY(14px) scale(0.985); } }
.gate-card h1 { margin: 0; font: 700 26px/1.15 var(--display, 'Unbounded', sans-serif); letter-spacing: -0.02em; color: #eef2fb; }
.gate-lead { margin: 0; color: #a9b5d0; font-size: 15px; line-height: 1.55; max-width: 66ch; }
.gate-doc-wrap { position: relative; flex: 1 1 auto; min-height: 180px; display: flex; }
.gate-doc { flex: 1; overflow-y: auto; padding: 20px 24px 8px; border-radius: 12px; background: #070a14; border: 1px solid rgba(132, 152, 200, 0.14); color: #c4cde2; font-size: 14px; line-height: 1.62; outline: none; scrollbar-width: thin; scrollbar-color: rgba(132, 152, 200, 0.3) transparent; overscroll-behavior: contain; }
.gate-doc:focus-visible { border-color: #6c8cff; }
.gate-fade { position: absolute; left: 1px; right: 12px; bottom: 1px; height: 70px; border-radius: 0 0 12px 12px; background: linear-gradient(transparent, #070a14); pointer-events: none; transition: opacity 0.3s; }
.gate.read .gate-fade { opacity: 0; }
.gate-progress { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #8d9ab8; }
.gp-track { flex: none; width: 140px; height: 4px; border-radius: 3px; background: rgba(132, 152, 200, 0.16); overflow: hidden; }
.gp-track i { display: block; height: 100%; width: 0; border-radius: 3px; background: #6c8cff; transition: width 0.12s linear; }
.gate-progress.done { color: #3ecf8e; }
.gate-progress.done .gp-track i { background: #3ecf8e; }
.gate-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.45; color: #dfe6f5; cursor: pointer; transition: opacity 0.2s; }
.gate-check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: #6c8cff; cursor: pointer; }
.gate-check:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.gate-check:has(input:disabled) input { cursor: not-allowed; }
.gate-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.gate-leave { color: #8d9ab8; font-weight: 600; text-decoration: none; }
.gate-leave:hover { color: #eef2fb; }
.gate-agree { padding: 12px 22px; border: 0; border-radius: 10px; font: 700 15px var(--body, 'Figtree', sans-serif); color: #fff; background: linear-gradient(180deg, #7d9aff, #5577f0); box-shadow: 0 10px 26px -10px rgba(108, 140, 255, 0.7); cursor: pointer; transition: filter 0.15s, transform 0.1s, opacity 0.2s; }
.gate-agree:hover:not(:disabled) { filter: brightness(1.08); }
.gate-agree:active:not(:disabled) { transform: translateY(1px); }
.gate-agree:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }

/* gift box: nearly invisible until you look for it */
.gift { position: relative; }
.gift-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid transparent; background: transparent; color: rgba(214, 222, 239, 0.32); cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.gift-btn:hover, .gift-btn[aria-expanded='true'] { color: rgba(232, 176, 75, 0.95); border-color: rgba(232, 176, 75, 0.3); background: rgba(232, 176, 75, 0.07); }
.gift-pop[hidden] { display: none; }
.gift-pop { position: absolute; right: 0; top: 46px; width: 250px; display: grid; gap: 7px; padding: 12px; border-radius: 12px; background: rgba(11, 16, 30, 0.97); border: 1px solid rgba(132, 152, 200, 0.22); box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5); animation: gate-card 0.2s ease both; }
.gift-pop label { font-size: 12.5px; font-weight: 700; color: #a9b5d0; }
.gift-pop input { width: 100%; box-sizing: border-box; padding: 9px 11px; border-radius: 9px; border: 1px solid rgba(132, 152, 200, 0.22); background: #070a14; color: #eef2fb; font: 600 14px var(--body, 'Figtree', sans-serif); outline: none; }
.gift-pop input:focus { border-color: #e8b04b; box-shadow: 0 0 0 3px rgba(232, 176, 75, 0.14); }
.gift-pop input.bad { animation: gift-shake 0.35s ease; border-color: #ef4e6a; }
@keyframes gift-shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
.gift-msg { margin: 0; min-height: 16px; font-size: 12.5px; color: #ef4e6a; }
.gift-msg.good { color: #e8b04b; font-weight: 700; }
.gift.unlocked .gift-btn { color: #e8b04b; animation: gift-pop 0.5s ease; }
@keyframes gift-pop { 40% { transform: scale(1.25) rotate(-8deg); } }

/* admin marker in the app's top bar */
.admin-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 800; letter-spacing: 0.02em; color: #e8b04b; background: rgba(232, 176, 75, 0.1); border: 1px solid rgba(232, 176, 75, 0.32); }

/* small refund-policy link after the terms */
.terms-refund { margin: 2px 0 6px; font-size: 12px; }
.terms-refund a { color: #6b789a; text-decoration: underline; text-underline-offset: 2px; }
.terms-refund a:hover { color: #a9b5d0; }
