/* Original pack "modern21": layout 21 reinterpreted. Ink charcoal ground,
   warm cream cards, coral and soft gold accents, a touch of jade; Shippori
   Mincho for titles, Manrope for everything else. */

html[data-theme-pack='modern21'] body {
  margin: 0;
  background: #14110e url(https://assets.aetunga.com/themes/modern21/images/waves-dark.jpg?v=14c9e50867) center top / 520px repeat;
  color: #efe6d8;
  font: 500 16px/1.6 Manrope, 'Segoe UI', sans-serif;
}

.m21 {
  --m21-ink: #14110e;
  --m21-ink-2: #1d1915;
  --m21-cream: #f7efe3;
  --m21-cream-2: #efe3d0;
  --m21-coral: #ff5d4d;
  --m21-coral-2: #ff8a5b;
  --m21-gold: #d9a94f;
  --m21-jade: #3fa98b;
  --m21-text-dark: #2a211a;
  --m21-muted-dark: #7c6c5d;
  --m21-muted: #a99a88;
  --m21-line: rgb(247 239 227 / .1);
  background: linear-gradient(180deg, transparent, rgb(20 17 14 / .7) 30%, #14110e 70%);
}
.m21 a { color: var(--m21-coral-2); transition: color .2s ease; }
.m21 a:hover { color: #ffb08a; }

/* Hero with the split menu over it */
.m21-hero { position: relative; height: clamp(520px, 70vh, 700px); overflow: hidden; isolation: isolate; border-radius: 0 0 36px 36px; }
.m21-hero-art { position: absolute; inset: 0; z-index: -2; background: url(https://assets.aetunga.com/themes/modern21/images/hero.jpg?v=dbf6ac280d) center 40% / cover no-repeat; animation: m21-pan 36s ease-in-out infinite alternate; }
.m21-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(20 17 14 / .55), transparent 26%, transparent 55%, rgb(20 17 14 / .85) 100%); }
.m21-petals span { top: -20px; width: calc(9px * var(--s)); height: calc(6px * var(--s)); border-radius: 60% 0 60% 0; background: linear-gradient(135deg, #ffb3a3, #ff6a55); opacity: .75; animation-name: m21-petal; }
.m21-bar { position: absolute; top: 18px; left: 50%; z-index: 5; display: flex; align-items: center; width: min(1180px, calc(100% - 2rem)); translate: -50% 0; }
.m21-nav { flex: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; height: 76px; padding: 0 1.6rem; border-radius: 22px; background: rgb(22 18 15 / .55); backdrop-filter: blur(18px) saturate(1.4); border: 1px solid rgb(255 255 255 / .12); box-shadow: 0 20px 40px -20px rgb(0 0 0 / .6); }
.m21-nav-side { display: flex; align-items: center; justify-content: space-evenly; gap: 1rem; }
.m21-nav-side a { position: relative; white-space: nowrap; padding: .35rem .2rem; color: #f3e9dc; font: 700 .82rem Manrope, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.m21-nav-side a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; border-radius: 2px; background: var(--m21-coral); transition: right .25s ease; }
.m21-nav-side a:hover, .m21-nav-side a.is-current { color: #fff; }
.m21-nav-side a:hover::after, .m21-nav-side a.is-current::after { right: 0; }
.m21-logo { display: block; padding: 0 1rem; filter: drop-shadow(0 2px 10px rgb(0 0 0 / .5)); transition: transform .3s ease; }
.m21-logo:hover { transform: scale(1.03); }
.m21-logo .site-name { text-shadow: none !important; letter-spacing: .02em; }
.m21-tools { position: absolute; right: -4.8rem; }
.m21 .pk-lang { border-radius: 14px; background: rgb(22 18 15 / .6); backdrop-filter: blur(10px); border: 1px solid rgb(255 255 255 / .12); flex-direction: column; }
.m21 .pk-lang button { color: #cdbfae; border-radius: 10px; }
.m21 .pk-lang button.is-active { background: var(--m21-coral); color: #fff; }
.m21-hero-copy { position: absolute; left: 50%; bottom: 13%; display: grid; justify-items: center; gap: 1rem; width: min(760px, calc(100% - 2rem)); translate: -50% 0; text-align: center; }
.m21-mark { width: 92px; filter: drop-shadow(0 6px 16px rgb(0 0 0 / .45)); animation: m21-spin 30s linear infinite; }
.m21-tagline { margin: 0; color: #fff; font: 800 clamp(1.8rem, 4vw, 3.1rem)/1.1 'Shippori Mincho B1', serif; letter-spacing: .01em; text-shadow: 0 4px 24px rgb(40 12 8 / .55); }
.m21-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: .3rem; }
.m21-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 52px; padding: 0 1.9rem; border-radius: 16px; font: 800 .88rem Manrope, sans-serif; letter-spacing: .1em; text-transform: uppercase; transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease; }
.m21-btn:hover { transform: translateY(-2px); }
.m21-btn--coral { color: #fff !important; background: linear-gradient(135deg, var(--m21-coral), var(--m21-coral-2)); box-shadow: 0 16px 34px -14px rgb(255 93 77 / .9); }
.m21-btn--coral:hover { box-shadow: 0 20px 40px -12px rgb(255 93 77 / 1); }
.m21-btn--glass { color: #fff !important; background: rgb(255 255 255 / .14); backdrop-filter: blur(10px); border: 1px solid rgb(255 255 255 / .35); }
.m21-btn--glass:hover { background: rgb(255 255 255 / .24); }

/* Columns */
.m21-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.8rem; width: min(1240px, calc(100% - 2rem)); margin: 2rem auto 0; align-items: start; }
.m21-content { display: grid; gap: 1.8rem; min-width: 0; }
.m21-side { display: grid; gap: 1.2rem; }
.m21-top { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1.2rem; align-items: stretch; }
.m21-stage { min-width: 0; }
.m21-stage .pk-slider { height: 100%; aspect-ratio: auto; min-height: 320px; }
/* No slider beside them (an inner page, or a site without slides): the tiles
   lie in one row across the column. Narrower screens already stack them. */
@media (min-width: 1101px) {
  .m21-top--bare { grid-template-columns: minmax(0, 1fr); }
  .m21-top--bare .m21-tiles { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-rows: none; }
  .m21 .m21-top--bare .m21-tile--download, .m21 .m21-top--bare .m21-tile--small { min-height: 148px; }
}

/* Tiles, after the classic's download and small buttons */
.m21-tiles { display: grid; grid-template-rows: 1fr auto; gap: 1.2rem; }
.m21-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: .15rem; padding: 1.2rem 1.3rem; overflow: hidden; border-radius: 22px; transition: transform .25s ease, box-shadow .25s ease; }
.m21-tile:hover { transform: translateY(-3px); }
.m21 .m21-tile--download { min-height: 220px; color: #fff; background: radial-gradient(circle at 70% 30%, #ff9b7a, transparent 55%), linear-gradient(145deg, #ff5d4d, #b8242a); box-shadow: 0 20px 40px -20px rgb(255 93 77 / .8); }
.m21-tile--download:hover { box-shadow: 0 26px 50px -18px rgb(255 93 77 / 1); }
.m21-pearl { position: absolute; top: -8px; right: -18px; width: 170px; filter: drop-shadow(0 12px 18px rgb(80 0 0 / .45)); animation: m21-bob 5s ease-in-out infinite; }
.m21-tile-title { position: relative; font: 800 1.35rem/1.15 'Shippori Mincho B1', serif; }
.m21-tile-note { position: relative; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.m21-tile-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.m21 .m21-tile--small { min-height: 92px; justify-content: center; align-items: center; color: var(--m21-text-dark) !important; background: url(https://assets.aetunga.com/themes/modern21/images/marble.jpg?v=fad1d061d0) center / 300px; box-shadow: 0 14px 30px -18px #000; text-align: center; }
.m21-tile--small .m21-tile-title { font-size: 1rem; }
.m21 .m21-tile--jade { color: #fff !important; background: linear-gradient(145deg, #45b596, #1f6e5a); }

/* Cream cards */
.m21-card { position: relative; padding: 1.5rem 1.4rem; color: var(--m21-text-dark); background: var(--m21-cream) url(https://assets.aetunga.com/themes/modern21/images/waves-light.jpg?v=56896d1273) center / 420px; border-radius: 24px; box-shadow: 0 24px 44px -26px #000; }
.m21-card-title { margin: 0 0 1rem; color: var(--m21-text-dark); font: 800 1.25rem 'Shippori Mincho B1', serif; }
.m21-card-title::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: .55rem; vertical-align: middle; border-radius: 2px; background: var(--m21-coral); transform: rotate(45deg); }
.m21 .m21-card .pk-field-label { color: var(--m21-muted-dark); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.m21 .m21-card .pk-input { color: var(--m21-text-dark); background: #fff; border: 1.5px solid #e4d6c2; border-radius: 12px; transition: border-color .2s ease, box-shadow .2s ease; }
.m21 .m21-card .pk-input:focus { outline: none; border-color: var(--m21-coral); box-shadow: 0 0 0 4px rgb(255 93 77 / .15); }
.m21 .pk-button--primary { color: #fff; border-radius: 14px; background: linear-gradient(135deg, var(--m21-coral), var(--m21-coral-2)); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 12px 24px -12px rgb(255 93 77 / .9); }
.m21 .pk-button--ghost { color: var(--m21-text-dark); background: transparent; border: 1.5px solid #dccbb4; border-radius: 14px; font-weight: 700; }
.m21 .pk-button--ghost:hover { border-color: var(--m21-coral); color: var(--m21-coral); }
.m21 .m21-card .pk-error { color: #c1271c; }
.m21 .m21-card .pk-login-links a, .m21 .m21-card .pk-more { color: #c0392b; font-weight: 700; }
.m21 .m21-card .pk-welcome { color: var(--m21-muted-dark); }
.m21 .m21-card .pk-welcome strong { color: var(--m21-text-dark); }
.m21 .m21-card .pk-account-links a { color: var(--m21-text-dark); border-radius: 12px; background: rgb(255 255 255 / .7); font-weight: 600; }
.m21 .m21-card .pk-account-links a:hover { background: #fff; color: #c0392b; }
.m21 .m21-card .pk-empty { color: var(--m21-muted-dark); }

/* Online counter and shop link */
.m21-online { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem; border-radius: 24px; background: var(--m21-ink-2); border: 1px solid var(--m21-line); }
.m21-online-number { color: #fff; font: 800 2.4rem/1 'Shippori Mincho B1', serif; font-variant-numeric: tabular-nums; }
.m21-online-label { display: inline-flex; align-items: center; gap: .5rem; color: var(--m21-muted); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.m21-live { width: 9px; height: 9px; border-radius: 50%; background: var(--m21-jade); box-shadow: 0 0 0 4px rgb(63 169 139 / .2); animation: m21-live 2s ease-in-out infinite; }
.m21-live.is-offline { background: var(--m21-coral); animation: none; }
.m21-shop { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0 1.4rem; border-radius: 18px; color: #2a1d0a !important; background: linear-gradient(135deg, #f2cf85, var(--m21-gold)); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 14px 30px -16px rgb(217 169 79 / .8); transition: transform .25s ease; }
.m21-shop svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.m21-shop:hover { transform: translateY(-2px); }
.m21-shop:hover svg { transform: translateX(4px); }

/* Events card with the warrior */
.m21-events { position: relative; min-height: 320px; padding: 1.4rem 1.4rem 1.2rem; overflow: hidden; border-radius: 24px; background: radial-gradient(circle at 80% 20%, rgb(255 138 91 / .5), transparent 55%), linear-gradient(160deg, #3a1a14, #1a1210 60%); border: 1px solid rgb(255 93 77 / .25); }
.m21-warrior { position: absolute; right: -36px; top: -10px; height: 270px; width: auto; max-width: none; filter: drop-shadow(0 16px 24px rgb(0 0 0 / .5)); opacity: .95; pointer-events: none; }
.m21-events-title { position: relative; margin: 0 0 7.5rem; max-width: 55%; color: #fff; font: 800 1.35rem/1.2 'Shippori Mincho B1', serif; }
.m21 .m21-events .pk-events { position: relative; }
.m21 .m21-events .pk-event { border-radius: 12px; background: rgb(20 17 14 / .72); backdrop-filter: blur(6px); }
.m21 .pk-event-title { color: #fff4e8; font-weight: 700; }
.m21 .pk-event-day { color: var(--m21-muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.m21 .pk-event-time { color: var(--m21-coral-2); font-weight: 800; }
.m21 .m21-events .pk-empty { position: relative; color: #e8d6c4; }

/* Medal rankings */
.m21-medals { display: grid; gap: .45rem; margin: 0 0 .2rem; padding: 0; list-style: none; }
.m21-medal-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 10px; align-items: center; gap: .6rem; min-height: 46px; padding: .25rem .6rem .25rem .3rem; border-radius: 14px; background: rgb(255 255 255 / .65); transition: background-color .2s ease, transform .2s ease; }
.m21-medal-row:hover { background: #fff; transform: translateX(3px); }
.m21-medal { width: 38px; height: auto; filter: drop-shadow(0 3px 5px rgb(0 0 0 / .25)); }
.m21-medal-num { display: grid; place-items: center; width: 32px; height: 32px; margin-left: 3px; border-radius: 50%; background: #eadcc8; color: var(--m21-muted-dark); font-weight: 800; }
.m21-medal-name { overflow: hidden; color: var(--m21-text-dark) !important; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.m21-medal-level { color: var(--m21-muted-dark); font-size: .8rem; font-weight: 700; }

/* Slider */
.m21 .pk-slider { border-radius: 24px; box-shadow: 0 24px 50px -26px #000; }
.m21 .pk-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(20 17 14 / .88), transparent 60%); pointer-events: none; }
.m21 .pk-slide-copy { z-index: 1; }
.m21 .pk-slide-title { color: #fff; font: 800 clamp(1.4rem, 2.6vw, 2.2rem)/1.15 'Shippori Mincho B1', serif; }
.m21 .pk-slide-text { color: #f0e3d3; max-width: 55ch; }
.m21 .pk-slider-arrow { color: #fff; background: rgb(255 255 255 / .16); backdrop-filter: blur(8px); }
.m21 .pk-slider-arrow:hover { background: var(--m21-coral); }
.m21 .pk-slider-dot { background: rgb(255 255 255 / .35); }
.m21 .pk-slider-dot.is-active { background: var(--m21-coral); }

/* Landing section and news */
.m21-section { padding: 1.8rem; border-radius: 26px; background: var(--m21-ink-2); border: 1px solid var(--m21-line); }
.m21-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; }
.m21-section-head h2 { margin: 0; color: #fff; font: 800 1.9rem 'Shippori Mincho B1', serif; }
.m21-section-head a { white-space: nowrap; font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.m21 .pk-news-card { color: #5b4d40; border-radius: 20px; background: var(--m21-cream) url(https://assets.aetunga.com/themes/modern21/images/waves-light.jpg?v=56896d1273) center / 380px; box-shadow: 0 16px 30px -22px #000; }
.m21 .pk-news-card:hover { box-shadow: 0 22px 40px -20px rgb(255 93 77 / .55); }
.m21 .pk-news-card.is-lead { color: #f2e6d8; background: linear-gradient(145deg, rgb(255 93 77 / .92), rgb(170 34 40 / .95)), url(https://assets.aetunga.com/themes/modern21/images/waves-dark.jpg?v=14c9e50867) center / 380px; }
.m21 .pk-news-date { color: #c0392b; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.m21 .pk-news-title { color: var(--m21-text-dark); font: 800 1.3rem/1.25 'Shippori Mincho B1', serif; }
.m21 .pk-news-more { color: #c0392b; font-weight: 800; }
.m21 .pk-news-card.is-lead :is(.pk-news-date, .pk-news-title, .pk-news-more) { color: #fff; }
.m21 .pk-news-empty { color: var(--m21-muted); border: 1.5px dashed var(--m21-line); border-radius: 20px; }

/* Footer */
.m21-footer { margin-top: 4rem; border-radius: 36px 36px 0 0; background: #0e0c0a; border-top: 1px solid var(--m21-line); }
.m21-footer-inner { display: grid; justify-items: center; gap: 1rem; padding: 2.5rem 1rem; text-align: center; }
.m21-footer-mark { width: 64px; }
.m21-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.8rem; }
.m21-footer-links a { color: var(--m21-muted); font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.m21-footer-links a:hover { color: #fff; }
.m21-footer-note { margin: 0; color: #7a6c5e; font-size: .85rem; }

@keyframes m21-pan { from { transform: scale(1.02) translateX(0); } to { transform: scale(1.08) translateX(-2%); } }
@keyframes m21-petal { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 10% { opacity: .8; } 100% { transform: translate(var(--drift), 720px) rotate(540deg); opacity: 0; } }
@keyframes m21-spin { to { rotate: 360deg; } }
@keyframes m21-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes m21-live { 0%, 100% { box-shadow: 0 0 0 3px rgb(63 169 139 / .25); } 50% { box-shadow: 0 0 0 7px rgb(63 169 139 / .05); } }

@media (max-width: 1380px) { .m21-tools { position: static; margin-left: .8rem; } .m21 .pk-lang { flex-direction: row; } }
@media (max-width: 1100px) {
  .m21-main { grid-template-columns: minmax(0, 1fr) 300px; }
  .m21-top { grid-template-columns: minmax(0, 1fr); }
  .m21-tiles { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .m21-tile-row { grid-template-columns: 1fr; }
  .m21-nav-side a { letter-spacing: .08em; }
}
@media (max-width: 900px) {
  .m21-main { grid-template-columns: minmax(0, 1fr); }
  .m21-bar { display: none; }
}
@media (max-width: 768px) {
  .m21-hero { height: 440px; border-radius: 0 0 24px 24px; }
  .m21-hero-copy { bottom: 10%; }
  .m21-btn { width: min(280px, 80vw); }
  .m21-main { width: calc(100% - 1.5rem); }
  .m21-tiles { grid-template-columns: 1fr; }
  .m21-tile-row { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .m21-hero-art, .m21-mark, .m21-pearl, .m21-live { animation: none; }
}

/* ------------------------------------------------------------ performance
   Every animation here runs on the compositor (transform, translate, scale,
   opacity, filter). One that animates box-shadow or background-position runs
   on the main thread, and then the browser restyles every other running
   animation on each frame it draws, which is where the stutter came from. */
.m21-live { position: relative; animation: none; }
.m21-live::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 7px rgb(63 169 139 / .14); opacity: 0; animation: m21-breathe 2s ease-in-out infinite; pointer-events: none; }
.m21-live.is-offline::after { display: none; }
@keyframes m21-breathe { 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .m21-live::after { display: none; } }

/* Phones get the middle of the hero, cropped at the same scale as the full picture. */
@media (max-width: 480px) { .m21-hero-art { background-image: url(https://assets.aetunga.com/themes/modern21/images/hero-m.webp?v=9d29170ade); } }
/* On a narrow screen the textures and card art below wait until the hero has painted (Shell.svelte adds .m21-settled). */
@media (max-width: 900px) {
  html[data-theme-pack='modern21']:not(.m21-settled) body { background-image: none; }
  html:not(.m21-settled) .m21 .m21-tile--small { background-image: none; }
  html:not(.m21-settled) .m21-card { background-image: none; }
  html:not(.m21-settled) .m21 .pk-news-card { background-image: none; }
  html:not(.m21-settled) .m21 .pk-news-card.is-lead { background-image: linear-gradient(145deg, rgb(255 93 77 / .92), rgb(170 34 40 / .95)); }
}
/* Room for pictures that start after the first paint, so nothing moves when they arrive. */
.m21-mark { aspect-ratio: 400 / 400; }
.m21-footer-mark { aspect-ratio: 400 / 400; }
