/* Browser chrome replacement and card consistency layer. */
* { scrollbar-width: thin; scrollbar-color: var(--violet) #e9e2cc; }
*::-webkit-scrollbar { width: 12px; height: 12px; }
*::-webkit-scrollbar-track { background: #e9e2cc; border-left: 2px solid var(--ink); }
*::-webkit-scrollbar-thumb { border: 3px solid #e9e2cc; border-radius: 99px; background: var(--violet); }
*::-webkit-scrollbar-thumb:hover { background: var(--coral); }
::selection { background: var(--pink); color: var(--ink); }

.native-control-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; opacity: 0 !important; pointer-events: none !important; }
.custom-select, .date-picker { position: relative; min-width: 0; }
.custom-select-trigger, .date-picker-trigger { width: 100%; min-height: 49px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border: 3px solid var(--ink); border-radius: 15px; background: #fffef9; box-shadow: 2px 3px 0 var(--ink); font-weight: 700; text-align: left; cursor: pointer; }
.custom-select-trigger i { width: 10px; height: 10px; border-right: 3px solid; border-bottom: 3px solid; transform: rotate(45deg) translateY(-3px); transition: transform .18s; }
.custom-select.is-open .custom-select-trigger i { transform: rotate(225deg) translate(-2px, -2px); }
.custom-select-menu, .date-picker-panel { position: fixed; z-index: 95; display: none; max-height: 60vh; overflow-y: auto; padding: 8px; border: 3px solid; border-radius: 17px; background: var(--surface); box-shadow: 7px 8px 0 var(--ink); }
.custom-select-menu.is-open, .date-picker-panel.is-open { display: grid; animation: control-pop .16s ease-out; }
.custom-select-menu button { width: 100%; padding: 11px 12px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; text-align: left; cursor: pointer; }
.custom-select-menu button:hover, .custom-select-menu button:focus, .custom-select-menu button[aria-selected="true"] { outline: none; background: var(--acid); }
.date-picker-trigger i { padding: 5px 7px; border: 2px solid; border-radius: 7px; background: var(--pink); font-size: 8px; font-style: normal; font-weight: 900; }
.date-picker-panel { width: min(340px, calc(100vw - 20px)); max-height: none; overflow: visible; padding: 16px; }
.date-picker-head { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; gap: 7px; margin-bottom: 13px; text-align: center; }
.date-picker-head button, .date-days button, .time-picker button { border: 2px solid; border-radius: 9px; background: white; cursor: pointer; }
.date-picker-head button { height: 34px; }
.date-weekdays, .date-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.date-weekdays { margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 900; text-align: center; }
.date-days > span, .date-days button { aspect-ratio: 1; }
.date-days button { border-color: transparent; font-size: 11px; font-weight: 800; }
.date-days button:hover, .date-days button.is-selected { border-color: var(--ink); background: var(--acid); }
.time-picker { display: grid; grid-template-columns: 1fr 30px 28px 30px auto 30px 28px 30px; align-items: center; gap: 4px; margin: 15px 0; padding-top: 13px; border-top: 2px dashed #b8b2a2; }
.time-picker > span { font-size: 9px; font-weight: 900; }
.time-picker button { height: 30px; }
.time-picker strong, .time-picker b { text-align: center; }
.date-done { width: 100%; min-height: 40px; border: 2px solid; border-radius: 99px; background: var(--violet); color: white; font-weight: 900; cursor: pointer; }
label.is-invalid > input, label.is-invalid > textarea, label.is-invalid .custom-select-trigger, label.is-invalid .date-picker-trigger { border-color: #d92727; background: #fff0ed; box-shadow: 3px 3px 0 #d92727; }

.toast { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 10px; overflow: hidden; border-radius: 18px; background: var(--ink); color: white; box-shadow: 7px 8px 0 var(--violet); }
.toast::before { content: "✓"; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--mint); color: var(--ink); font-size: 10px; }
.toast.error { background: var(--ink); color: white; box-shadow: 7px 8px 0 var(--coral); }
.toast.error::before { content: "!"; background: var(--coral); }

.blog-card, .social-card, .shop-item, .streamer, .directory-card, .equal-card { min-width: 0; overflow: hidden; }

/* Fun editorial blog blocks. */
.blog-card { display: grid; grid-template-rows: auto 1fr auto auto; height: 100%; min-height: 410px; padding: 0; }
.blog-card:nth-child(4n+1) { background: var(--acid); }
.blog-card:nth-child(4n+2) { background: var(--sky); }
.blog-card:nth-child(4n+3) { background: var(--pink); }
.blog-card:nth-child(4n) { background: #d7f7e7; }
.blog-card > .meta { align-items: center; padding: 17px 22px; border-bottom: 2px solid; background: rgb(255 253 243 / 55%); }
.blog-card > .meta .tag { background: var(--surface); transform: rotate(-3deg); }
.blog-card > h3 { align-self: end; margin: 0; padding: 46px 22px 12px; font: 900 clamp(30px, 3.6vw, 47px)/.95 "Dior Display", Arial Black; letter-spacing: -.05em; transform: rotate(-1.2deg); overflow-wrap: anywhere; }
.blog-card:nth-child(even) > h3 { transform: rotate(1.2deg); }
.blog-card > p { padding: 0 22px; line-height: 1.55; }
.blog-card > .button { margin: 14px 22px 23px; justify-self: start; align-self: end; position: relative; }
.blog-card > .button::after { content: "→"; transition: transform .18s; }
.blog-card > .button:hover::after { transform: translateX(5px); }
.blog-card { counter-increment: blognum; }
.blog-card::after { content: "0" counter(blognum); position: absolute; right: 14px; top: 6px; font: 900 74px/1 "Dior Display", Arial Black; letter-spacing: -.06em; opacity: .14; pointer-events: none; }
@media (hover: hover) {
  .blog-card:hover { transform: rotate(-.7deg) translateY(-5px); box-shadow: 10px 12px 0 var(--ink); }
  .blog-card:nth-child(even):hover { transform: rotate(.7deg) translateY(-5px); }
}
.blog-hero-note { max-width: 660px; }

.social-card { display: grid; grid-template-rows: auto 1fr auto auto; min-height: 260px; }
.social-card .post-content { min-height: 80px; }
.shop-item { display: grid; grid-template-rows: auto 1fr auto auto auto; align-items: center; min-height: 430px; }
.shop-item > .tag { justify-self: center; }
.shop-item h3 { min-height: 48px; margin-bottom: 12px; font-size: 24px; }
.shop-item .coin { justify-self: center; margin-bottom: 18px; }
.shop-item > .button { width: 100%; }
.equal-card { height: 100%; }
.streamer { display: grid; grid-template-rows: auto 1fr auto auto auto; min-height: 340px; }
.streamer h3 { align-self: end; margin: 35px 0 8px; }
.streamer > p { min-height: 38px; }
.streamer-code { justify-self: start; }
.stream-link { align-self: end; justify-self: start; margin-top: 13px; }
.directory-card { display: grid; grid-template-rows: auto auto 1fr auto auto; min-height: 280px; }
.directory-card h3 { margin: 24px 0 10px; font-size: 28px; }
.directory-card > p { line-height: 1.5; }

/* Identity: avatars, account menu, oauth, profile, platform chips. */
.avatar { overflow: hidden; }
.avatar-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.account-menu-wrap { position: relative; }
.account-trigger { width: 46px; height: 46px; padding: 0; border: 3px solid; border-radius: 42% 58% 48% 52%; background: var(--coral); overflow: hidden; cursor: pointer; }
.account-trigger.neon { box-shadow: 0 0 0 4px var(--acid), 0 0 0 7px var(--violet); }
.account-trigger.founder { border: 6px double var(--violet); }
.account-popover { position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; display: grid; gap: 4px; min-width: 190px; padding: 9px; border: 3px solid; border-radius: 17px; background: var(--surface); box-shadow: 6px 7px 0 var(--ink); }
.account-popover[hidden] { display: none; }
.account-popover button { padding: 11px 12px; border: 0; border-radius: 10px; background: transparent; font-weight: 800; text-align: left; cursor: pointer; }
.account-popover button:hover { background: var(--pink); }
.oauth-row { display: grid; gap: 9px; margin-bottom: 14px; }
.oauth.google { background: #ffffff; color: #1f1f1f; }
.oauth.google:hover { background: #f1f3f4; }
.oauth.github { background: #24292f; color: #ffffff; }
.oauth.github:hover { background: #32383f; }
.oauth-divider { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.oauth-divider::before, .oauth-divider::after { content: ""; flex: 1; height: 2px; background: #b8b2a2; }
.profile-layout { display: grid; gap: 28px; max-width: 980px; margin: 0 auto; }
.profile-hero-card { padding: 0; }
.profile-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; padding: 30px; }
.profile-avatar-xl { flex: 0 0 auto; display: grid; place-items: center; width: 128px; height: 128px; border: 4px solid; border-radius: 38% 62% 48% 52%; background: var(--coral); overflow: hidden; box-shadow: var(--shadow); font-size: 38px; font-weight: 900; text-transform: uppercase; }
.profile-avatar-cosmetic { position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 158px; height: 158px; }
.profile-avatar-cosmetic .profile-avatar-xl { position: relative; z-index: 1; flex: none; width: 112px; height: 112px; box-shadow: none; }
.profile-border-art { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none; filter: drop-shadow(4px 5px 0 rgb(32 33 29 / 30%)); }
.profile-border-art svg, .profile-border-art .custom-art { display: block; width: 100%; height: 100%; overflow: visible; }
.profile-hero-main { min-width: 260px; flex: 1; }
.profile-hero-main h1 { margin-bottom: 10px; font-size: clamp(44px, 6vw, 72px); }
.profile-name-cosmetic { position: relative; isolation: isolate; width: fit-content; max-width: 100%; padding: 8px 18px 10px 0; }
.profile-name-cosmetic h1 { position: relative; z-index: 2; margin: 0; }
.profile-effect-art { position: absolute; z-index: 1; top: 50%; right: -52px; width: 112px; height: 112px; opacity: .42; transform: translateY(-50%) rotate(12deg); pointer-events: none; }
.profile-effect-art svg, .profile-effect-art .custom-art { width: 100%; height: 100%; overflow: visible; }
.profile-effect-art.fx-effect-0 { animation: cosmetic-pulse 2.8s ease-in-out infinite; }
.profile-effect-art.fx-effect-1 { transform: translateY(-50%) rotate(-10deg); }
.profile-effect-art.fx-effect-2 { filter: drop-shadow(0 0 12px currentColor); }
.profile-effect-art.fx-effect-3 { animation: cosmetic-glitch 2.2s steps(2, end) infinite; }
.profile-effect-art.fx-effect-4 { animation: cosmetic-float 3.4s ease-in-out infinite; }
@keyframes cosmetic-pulse { 0%, 100% { opacity: .32; transform: translateY(-50%) rotate(8deg) scale(.94); } 50% { opacity: .62; transform: translateY(-50%) rotate(16deg) scale(1.08); } }
@keyframes cosmetic-glitch { 0%, 88%, 100% { transform: translateY(-50%) translateX(0) rotate(12deg); } 90% { transform: translateY(-50%) translateX(7px) rotate(16deg); } 94% { transform: translateY(-50%) translateX(-5px) rotate(8deg); } }
@keyframes cosmetic-float { 0%, 100% { transform: translateY(-54%) rotate(8deg); } 50% { transform: translateY(-44%) rotate(16deg); } }
.profile-hero-bio { max-width: 560px; margin-bottom: 12px; color: #4f5047; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-hero-actions { display: grid; align-content: end; gap: 10px; }
.profile-stats { grid-template-columns: repeat(4, 1fr); }
.profile-section h3 { margin-bottom: 14px; font-size: 26px; }
.profile-section > .pills { margin-bottom: 14px; }
.profile-section-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.profile-section-head h3, .profile-section-head p { margin-bottom: 4px; }
.profile-cosmetic-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.profile-cosmetic { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 13px; min-width: 0; padding: 12px; border: 2px solid var(--line); border-radius: 17px; background: rgb(255 255 255 / 42%); }
.profile-cosmetic.is-equipped { border-color: var(--t-accent, var(--violet)); box-shadow: 3px 3px 0 var(--t-accent, var(--violet)); }
.profile-cosmetic-art { display: grid; place-items: center; width: 64px; height: 64px; overflow: hidden; border: 2px solid var(--line); border-radius: 15px; background: #dedad0; }
.profile-cosmetic-art svg, .profile-cosmetic-art .custom-art { display: block; width: 100%; height: 100%; }
.profile-cosmetic-copy { display: grid; justify-items: start; gap: 3px; min-width: 0; }
.profile-cosmetic-copy strong { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.profile-cosmetic-copy small { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.profile-cosmetic .button { min-width: 70px; }
.verify-tag { background: var(--mint); }
.verify-code { display: inline-block; margin-bottom: 10px; padding: 10px 14px; border: 3px dashed; border-radius: 12px; background: var(--acid); font: 900 20px/1 "Dior Display", Arial Black; letter-spacing: .04em; }
.platform-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.platform-chips button { padding: 9px 13px; border: 2px solid; border-radius: 99px; background: var(--surface); box-shadow: 2px 2px 0 var(--ink); font-size: 11px; font-weight: 900; cursor: pointer; }
.platform-chips button:hover { background: var(--pink); }
.platform-chips button.active { background: var(--ink); color: var(--paper); }
.platform-chips .meta { margin-left: auto; }
.streamer-statline { margin: 0 0 8px !important; color: var(--muted); font-size: 11px; font-weight: 900; min-height: 0 !important; }
.avatar-upload { justify-self: start; cursor: pointer; }
.avatar-upload input { display: none; }
.application-card .verify-code { margin: 12px 0; }
.application-card .button { margin-top: 6px; }

/* Identity chips + clickable names + profile activity. */
.chips { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.chip { display: inline-block; padding: 1px 6px; border: 1.5px solid; border-radius: 99px; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.chip-streamer { background: var(--mint); }
.chip-badge { background: var(--surface); }
.linklike { background: none; border: 0; padding: 0; font: inherit; font-weight: 800; cursor: pointer; }
.linklike:hover { color: var(--violet); text-decoration: underline; }
.avatar-link { cursor: pointer; }
.avatar-link:hover { transform: scale(1.06); }
.post-edit-box { margin-top: 10px; display: grid; gap: 8px; }
.post-edit-box textarea { min-height: 84px; }
.comment .row { margin-top: 6px; }
.activity-item { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid #ececec; }
.activity-item:last-child { border-bottom: 0; }
.activity-item p { margin: 0; overflow-wrap: anywhere; }

/* Badge system: hand-drawn SVG medals. */
.badge-medal { display: block; width: 62px; height: 70px; filter: drop-shadow(3px 4px 0 var(--ink)); transition: transform .2s; }
.badge-medal svg { width: 100%; height: 100%; display: block; }
@media (hover: hover) { .badge-medal:hover { transform: translateY(-3px) rotate(-3deg); } }
.profile-section .badge-medal { width: 76px; height: 86px; }
.profile-section .badges > div { display: grid; justify-items: center; gap: 6px; }
.profile-section .badges small { text-align: center; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; }

/* Badge library: achievement catalog and personal progress. */
.badge-library-head { align-items: center; }
.badge-library-summary { flex: 0 0 auto; display: grid; place-items: center; width: 160px; aspect-ratio: 1; padding: 20px; border: 3px solid; border-radius: 45% 55% 48% 52%; background: var(--pink); box-shadow: var(--shadow); text-align: center; transform: rotate(3deg); }
.badge-library-summary strong { font: 900 52px/1 "Dior Display", Arial Black, sans-serif; letter-spacing: -.06em; }
.badge-library-summary span { max-width: 110px; font-size: 10px; font-weight: 900; line-height: 1.25; text-transform: uppercase; }
.badge-login-note { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 25px; padding: 15px 18px; border: 2px solid; border-radius: 18px; background: var(--acid); box-shadow: 3px 3px 0 var(--ink); }
.badge-login-note p { margin: 0; font-weight: 800; }
.badge-library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px; }
.badge-library-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; min-height: 330px; overflow: hidden; }
.badge-library-card:nth-child(4n+1) { background: #f0eaff; }
.badge-library-card:nth-child(4n+2) { background: #daf7ff; }
.badge-library-card:nth-child(4n+3) { background: #ffe3ef; }
.badge-library-card:nth-child(4n) { background: #e0f8eb; }
.badge-library-card.is-locked { background: #e7e3d8; }
.badge-library-card.is-locked .badge-medal { filter: grayscale(1) drop-shadow(3px 4px 0 var(--ink)); opacity: .52; }
.badge-library-art { display: grid; align-content: center; justify-items: center; gap: 14px; padding-right: 22px; border-right: 2px dashed rgb(32 33 29 / 35%); }
.badge-library-art .badge-medal { width: 116px; height: 130px; }
.badge-library-art .custom-art { border-radius: 18px; }
.badge-state { padding: 6px 10px; border: 2px solid; border-radius: 99px; background: #d9d5c9; font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.is-earned .badge-state { background: var(--acid); }
.badge-library-copy { min-width: 0; }
.badge-library-copy h3 { margin: 16px 0; font: 900 clamp(27px, 3vw, 38px)/.95 "Dior Display", Arial Black, sans-serif; letter-spacing: -.045em; }
.badge-library-copy dl { display: grid; gap: 12px; margin: 0 0 20px; }
.badge-library-copy dl > div { display: grid; gap: 3px; }
.badge-library-copy dt, .badge-progress-head span { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.badge-library-copy dd { margin: 0; font-size: 13px; line-height: 1.45; }
.badge-progress-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.badge-progress-head strong { font-size: 11px; }
.badge-progress { height: 13px; }
.badge-progress span { background: linear-gradient(90deg, var(--mint), var(--violet)); }

@keyframes control-pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 680px) {
  *::-webkit-scrollbar { width: 8px; height: 8px; }
  .time-picker { grid-template-columns: 1fr 27px 24px 27px auto 27px 24px 27px; }
  .blog-card { min-height: 360px; padding: 0; }
  .blog-card > h3 { padding-top: 38px; font-size: 32px; }
  .blog-card::after { font-size: 56px; }
  .shop-item { min-height: 400px; }
  .streamer { min-height: 310px; }
  .account-popover { position: fixed; top: auto; right: 14px; bottom: 86px; }
  .profile-hero { gap: 18px; padding: 24px; }
  .profile-avatar-xl { width: 96px; height: 96px; font-size: 28px; }
  .profile-avatar-cosmetic { width: 128px; height: 128px; }
  .profile-avatar-cosmetic .profile-avatar-xl { width: 88px; height: 88px; }
  .profile-effect-art { right: -24px; width: 82px; height: 82px; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .profile-cosmetic-list { grid-template-columns: 1fr; }
  .profile-cosmetic { grid-template-columns: 56px minmax(0, 1fr); }
  .profile-cosmetic-art { width: 56px; height: 56px; }
  .profile-cosmetic .button { grid-column: 1 / -1; width: 100%; }
  .platform-chips .meta { width: 100%; margin-left: 0; }
  .badge-library-summary { width: 124px; margin-top: 25px; }
  .badge-library-summary strong { font-size: 42px; }
  .badge-login-note { align-items: stretch; flex-direction: column; }
  .badge-library-grid { grid-template-columns: 1fr; }
  .badge-library-card { grid-template-columns: 92px minmax(0, 1fr); gap: 15px; min-height: 0; padding: 18px; }
  .badge-library-art { padding-right: 14px; }
  .badge-library-art .badge-medal { width: 78px; height: 88px; }
  .badge-library-copy h3 { margin-top: 12px; font-size: 27px; }
}

/* Directory favicon. */
.site-favicon { display: inline-block; width: 26px; height: 26px; margin-right: 8px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; vertical-align: middle; }
