@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Noto+Sans+KR:wght@400;500;600;700;800;900&display=swap');

:root {
  color-scheme: dark;
  font-family: "DM Sans", "Noto Sans KR", system-ui, sans-serif;
  color: #f7f7fa;
  background: #13151b;
  font-synthesis: none;
  --surface: #191c24;
  --raised: #20242d;
  --line: #333842;
  --muted: #aeb3bf;
  --accent: #d8fa72;
  --accent-ink: #1c2510;
  --radius: 16px;
  --max: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 300px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; word-break: keep-all; }
button, input, textarea, select { font: inherit; }
button, summary, select { cursor: pointer; }
button:disabled { opacity: .54; cursor: wait; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4 { margin: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: 8px; left: 12px; z-index: 30; padding: 10px 15px; color: #151813; background: var(--accent); border-radius: 8px; transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid #282c34; background: #15171e; }
.header-inner { width: min(var(--max), 100% - 64px); min-height: 66px; margin: auto; display: flex; align-items: center; gap: 42px; }
.site-brand { display: flex; gap: 9px; align-items: center; color: #f6f6f8; font-size: 26px; font-weight: 800; letter-spacing: -1.4px; }
.brand-accent { color: var(--accent); }
.brand-mark { width: 28px; height: 28px; display: flex; flex-direction: column; justify-content: center; padding-left: 6px; gap: 3px; border-radius: 8px; background: var(--accent); }
.brand-mark i { display: block; width: 15px; height: 2px; border-radius: 2px; background: var(--accent-ink); }
.brand-mark i:nth-child(2) { width: 11px; }
.brand-mark i:nth-child(3) { width: 8px; }
.site-nav, .account-controls { display: flex; align-items: center; gap: 24px; }
.site-nav a { color: #bfc2ce; font-size: 14px; font-weight: 600; }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] { color: var(--accent); }
.account-controls { margin-left: auto; gap: 9px; font-size: 14px; }
.account-profile-menu { position: relative; min-width: 0; }
.account-profile-menu > summary { list-style: none; min-width: 0; }
.account-profile-menu > summary::-webkit-details-marker { display: none; }
.account-profile-menu > summary > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-profile-choices { position: absolute; z-index: 16; inset-inline-end: 0; top: calc(100% + 6px); display: grid; gap: 3px; min-width: 8rem; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); box-shadow: 0 10px 25px #0008; }
.account-profile-menu:not([open]) .account-profile-choices { display: none; }
.account-profile-choices a { display: block; padding: 9px 10px; border-radius: 5px; white-space: nowrap; }
.account-profile-choices a:is(:hover, :focus-visible, [aria-current="page"]) { background: #343a31; color: var(--accent); }
.site-footer { border-top: 1px solid #292c35; margin-top: 70px; color: #a1a7b3; font-size: 13px; }
.site-footer > div { width: min(var(--max), 100% - 64px); min-height: 80px; margin: auto; display: flex; align-items: center; gap: 17px; }
.footer-brand { color: #eef0f4; font-size: 19px; font-weight: 800; letter-spacing: -.5px; }
main { flex: 1; width: min(var(--max), 100% - 64px); margin: 0 auto; }
.site-announcement { margin: 16px 0 0; padding: 11px 14px; border: 1px solid #6a7548; border-radius: 8px; background: #252b21; color: #eaf2d4; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
#app { outline: none; }
.loading-state { padding: 64px 0; color: var(--muted); }
.hero { position: relative; min-height: 528px; display: grid; align-items: center; grid-template-columns: 1fr 1fr; gap: 52px; isolation: isolate; padding: 64px 0 63px; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: 0 -34px; pointer-events: none; background: radial-gradient(ellipse at 79% 45%, #3f532b52, #171b221b 54%, transparent 70%); }
.hero-copy { display: grid; justify-items: start; }
.hero h1 { font-size: clamp(48px, 6vw, 86px); font-weight: 900; letter-spacing: -.085em; line-height: 1.17; color: #fafafb; }
.hero h1 em, .hero h1 span, .hero-accent { color: var(--accent); font-style: normal; }
.hero-copy p { color: #b7bdc8; font-size: clamp(14px, 1.5vw, 17px); line-height: 1.75; margin-top: 21px; max-width: 418px; }
.hero-actions, .page-actions, .modal-actions, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.hero-actions { margin-top: 30px; gap: 11px; }
.hero-preview { min-width: 0; position: relative; transform: rotate(-4deg); padding: 13px; background: #1c2026; border-radius: 20px; border: 1px solid #4c5048; box-shadow: 0 24px 66px #0007; }
.hero-preview::after { content: ""; position: absolute; inset: 4px -10px -11px 10px; border: 1px solid #bac5a022; border-radius: 22px; pointer-events: none; z-index: -1; }
.preview-head, .preview-heading, .preview-top { padding: 3px 8px 10px; color: #bdc3ce; font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 5px; }
.preview-tier { display: flex; gap: 7px; margin: 4px 0; background: #14171d; min-height: 54px; border-radius: 7px; overflow: hidden; }
.preview-tier > strong, .preview-tier > span:first-child, .preview-tier > b:first-child, .preview-label { background: var(--tier-color, var(--row-color,#fac49f)); color: #222122; width: 48px; flex: 0 0 48px; min-height: 54px; display: grid; place-items: center; font-size: 19px; font-weight: 800; }
.preview-tier:nth-of-type(3) { --row-color: #f6dca5; }
.preview-tier:nth-of-type(4) { --row-color: #d4e99c; }
.preview-tier:nth-of-type(5) { --row-color: #9adbbe; }
.preview-tier:nth-of-type(6) { --row-color: #a5b9e9; }
.preview-cards { flex: 1; display: flex; align-items: center; gap: 4px; padding: 4px 0; }
.preview-tile { display: block; border-radius: 5px; width: min(46px, 12vw); aspect-ratio: 1; overflow: hidden; background: var(--tile, #a8ad95); position: relative; }
.preview-tile::before { content: ""; position: absolute; inset: -16%; opacity: .84; background: radial-gradient(circle at 42% 52%, #e6e6dd88 0 10%, #000d 11% 28%, #f3f3ed77 29% 31%, #18181894 33% 42%, transparent 43%), linear-gradient(34deg, #0007, transparent 71%); transform: rotate(-22deg); }
.preview-tile:nth-child(2n)::before { background: repeating-linear-gradient(110deg,#000a 0 5%,transparent 6% 16%), linear-gradient(30deg,transparent 28%,#faf6e57d 29% 55%,#08080b88 56%); }
.preview-tile:nth-child(3n)::before { background: radial-gradient(circle at 56% 38%, #ffdf9dbb 0 16%, transparent 17%), linear-gradient(155deg,#12151f 0 33%,transparent 34% 65%,#11151be0 66%); }
.preview-tile:nth-child(4n)::before { background: repeating-radial-gradient(circle at 75% 30%,#0008 0 3%,transparent 5% 12%); }
.home-section { margin-top: 31px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(21px, 3vw, 30px); font-weight: 800; letter-spacing: -.045em; }
.section-head p { margin-top: 6px; color: var(--muted); }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.managed-result-card { display: grid; grid-template-rows: 1fr auto; gap: 8px; min-width: 0; }
.managed-result-card > button { justify-self: end; }
.template-card { display: block; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); overflow: hidden; min-width: 0; transition: border-color .18s, transform .18s; }
a.template-card:hover, .template-card:has(a:hover) { border-color: #777f68; transform: translateY(-2px); }
.template-cover { aspect-ratio: 2.25; display: grid; place-content: center; overflow: hidden; font-size: 27px; font-weight: 900; background: linear-gradient(140deg,#37463c,#252337 64%,#1d202a); }
.template-cover:has(img) { display: block; }
.template-cover img { width: 100%; height: 100%; object-fit: contain; }
.template-cover-authored img { object-fit: cover; }
.template-info { display: grid; gap: 6px; padding: 15px; }
.template-info h3 { white-space: normal; overflow-wrap: anywhere; font-size: 16px; }
.template-info p, .template-info small { color: var(--muted); font-size: 13px; line-height: 1.55; }
.page-shell { margin: 0 auto; padding-top: 44px; width: min(100%, 1140px); }
.page-head { margin: 0 0 24px; display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; }
.page-head h1 { font-size: clamp(28px, 5vw, 50px); line-height: 1.18; letter-spacing: -.055em; overflow-wrap: anywhere; }
.page-head p { color: var(--muted); margin-top: 8px; line-height: 1.65; max-width: 74ch; overflow-wrap: anywhere; }
.page-head a:not(.button), .panel a:not(.button) { color: var(--accent); }
.template-heading { display: flex; align-items: center; gap: 15px; min-width: 0; }
.template-heading .page-head-copy { min-width: 0; }
.template-heading-thumbnail {
  flex: 0 0 auto;
  width: clamp(76px, 22vw, 170px);
  aspect-ratio: 2.25;
  object-fit: cover;
  align-self: flex-start;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #14171e;
}
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 22px; margin: 0 0 20px; }
.panel h2 { font-size: 20px; letter-spacing: -.035em; }
.panel + .panel { margin-top: 16px; }
.form-stack { display: grid; gap: 13px; }
.form-grid { display: grid; gap: 15px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 228px), 1fr)); }
.form-field { display: grid; gap: 7px; font-size: 14px; font-weight: 600; min-width: 0; }
.collaboration-choice { display: flex; align-items: flex-start; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--raised); cursor: pointer; }
.collaboration-choice input { flex: none; width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--accent); }
.collaboration-choice span { display: grid; gap: 3px; }
.collaboration-choice small { color: var(--muted); font-size: 13px; }
.collaboration-pill { border-color: #66754a; color: #e0f8a2; }
.form-field:has(input[type="url"]) { flex: 1; }
.template-thumbnail-editor {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  margin-bottom: 8px;
}
.template-thumbnail-preview {
  display: grid;
  place-items: center;
  width: min(190px, 100%);
  aspect-ratio: 2.25;
  overflow: hidden;
  border: 1px solid #454a58;
  border-radius: 7px;
  background: #151820;
  color: var(--muted);
  font-size: 13px;
}
.template-thumbnail-preview:has(img) { display: block; }
.template-thumbnail-preview img { width: 100%; height: 100%; object-fit: cover; }
.template-thumbnail-content { display: grid; gap: 5px; min-width: 0; }
.template-thumbnail-content .field-label { font-size: 14px; font-weight: 750; }
.template-thumbnail-content small, .template-thumbnail-status { font-size: 13px; color: var(--muted); }
.template-thumbnail-actions { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.template-thumbnail-status:empty { display: none; }
.template-thumbnail-error { color: #ffd0d1; }
.delete-name, .delete-description { overflow-wrap: anywhere; line-height: 1.55; }
.delete-description { font-size: 14px; color: var(--muted); }
label, input, textarea, select { max-width: 100%; }
input:not([type="color"]), textarea, select {
  border: 1px solid #454a58; border-radius: 9px; background: #14171e; color: #f3f4f8; padding: 9px 11px; min-height: 42px; line-height: 1.45;
}
input::placeholder, textarea::placeholder { color: #9399a5; }
textarea { min-height: 74px; resize: vertical; }
input[type="file"] { font-size: 13px; }
.button, button { min-height: 38px; padding: 7px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-align: center; border-radius: 9px; font-size: 13px; font-weight: 750; line-height: 1.4; border: 1px solid #464b56; background: #252934; color: #eef0f7; transition: background .15s, border-color .15s; }
.button:hover, button:hover { background: #303644; border-color: #666d7a; }
.button-primary { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); }
.button-primary:hover { color: #17200d; background: #e4ff9a; border-color: #e4ff9a; }
.button-secondary { background: #252934; }
.button-quiet { background: transparent; border-color: transparent; }
.button-danger { color: #ffc9c8; border-color: #784b50; }
.hero-actions .button { min-height: 49px; padding: 0 18px; }
.page-actions .button, .modal-actions .button { min-height: 42px; }
.status-pill { display: inline-flex; align-items: center; padding: 3px 9px; font-size: 12px; line-height: 1.6; border-radius: 99px; border: 1px solid #454a49; color: #cdd2c1; background: #252a25; }
.notice, .empty-state { color: #bcc2ce; border: 1px dashed #464b55; border-radius: 12px; padding: 14px; line-height: 1.6; font-size: 14px; overflow-wrap: anywhere; }
.notice + .notice { margin-top: 8px; }
.notice.error, .notice[data-kind="error"], .notice-error { color: #ffd0d1; border-color: #8b5a60; background: #342127; }
.comment-list { display: grid; gap: 1px; padding: 0; margin: 14px 0 0; list-style: none; }
.comment-item { border-top: 1px solid var(--line); padding: 14px 0; overflow-wrap: anywhere; }
.comment-item p { line-height: 1.65; white-space: pre-wrap; margin: 6px 0; }
.comment-item time { margin-left: 8px; color: var(--muted); font-size: 12px; }
.comment-item .button { min-height: 28px; font-size: 12px; padding: 3px 7px; }
dialog { border: 1px solid #505563; background: var(--surface); color: #f7f7fa; border-radius: 18px; width: min(460px, 100% - 26px); padding: 0; }
dialog::backdrop { background: #08090cd1; }
.modal-card { display: grid; gap: 16px; padding: 22px; }
.modal-card h2 { color: #fbfbfc; font-size: 25px; letter-spacing: -.04em; }
#toast-region { position: fixed; z-index: 15; left: 50%; bottom: 22px; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { border-radius: 10px; border: 1px solid #596350; background: #222a22; color: #edfacf; font-size: 14px; padding: 12px 17px; box-shadow: 0 10px 24px #0008; }
.player-panel { --player-default-width: 242px; position: sticky; top: max(8px, env(safe-area-inset-top)); z-index: 6; margin: 0 0 10px auto; width: min(100%, var(--player-default-width)); color: #f8f8f9; background: #20242b; border: 1px solid #575d69; border-radius: 12px; padding: 7px; box-shadow: 0 6px 16px #0005; }
.player-panel-floating { position: fixed; inset: auto; top: var(--player-y); left: var(--player-x); z-index: 12; width: var(--player-width, min(var(--player-default-width), 100vw - 16px)); margin: 0; }
.player-heading { display: flex; justify-content: space-between; gap: 7px; padding: 0 0 6px; }
.player-handle { display: flex; flex: 1; align-items: center; gap: 7px; min-width: 0; border-radius: 5px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.player-handle:active { cursor: grabbing; }
.player-handle:focus-visible { outline-offset: 1px; }
.player-grip { flex: 0 0 12px; height: 18px; background: radial-gradient(circle, var(--muted) 1.2px, transparent 1.7px) 0 0 / 6px 6px; }
.player-heading h2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.player-heading button { position: relative; z-index: 2; flex: 0 0 auto; min-width: 36px; min-height: 36px; padding: 0; font-size: 19px; }
.player-stage { height: var(--player-stage-height, 200px); min-width: 200px; background: #000; }
.player-stage iframe { display: block; width: 100%; height: 100%; border: 0; }
.player-panel-gesturing .player-stage iframe { pointer-events: none; }
.player-resize-handle { position: absolute; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; color: #bdc3cf; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 7px; }
.player-resize-handle::before { content: ""; width: 10px; height: 10px; border-top: 2px solid currentColor; border-left: 2px solid currentColor; border-top-left-radius: 4px; pointer-events: none; }
.player-resize-handle:is(:hover, :focus-visible, :active) { color: var(--accent); }
.player-resize-handle:focus-visible { outline-offset: -4px; }
.player-panel:has(.player-stage[hidden]) .player-resize-handle { display: none; }
.player-resize-handle[data-player-resize="nw"] { top: -10px; left: -10px; cursor: nwse-resize; }
.player-resize-handle[data-player-resize="ne"] { top: -10px; right: -10px; cursor: nesw-resize; }
.player-resize-handle[data-player-resize="sw"] { bottom: -10px; left: -10px; cursor: nesw-resize; }
.player-resize-handle[data-player-resize="se"] { bottom: -10px; right: -10px; cursor: nwse-resize; }
.player-resize-handle[data-player-resize="ne"]::before { transform: rotate(90deg); }
.player-resize-handle[data-player-resize="se"]::before { transform: rotate(180deg); }
.player-resize-handle[data-player-resize="sw"]::before { transform: rotate(270deg); }
.player-status, .player-source { display: block; font-size: 13px; line-height: 1.4; padding: 6px 2px 0; }
.player-source { color: var(--accent); }
@media (min-width: 850px) {
  .player-panel { --player-default-width: 276px; }
  .editor-area:has(> .player-panel:not([hidden], .player-panel-floating)) { display: grid; grid-template-columns: minmax(0, 1fr) 276px; align-items: start; gap: 14px; }
  .editor-area > .player-panel:not(.player-panel-floating) { grid-column: 2; grid-row: 1; width: 100%; margin: 0; }
  .editor-area > .board-editor { grid-column: 1; grid-row: 1; }
}
.board-editor { min-width: 0; margin: 0 0 18px; }
.board-toolbar { margin: 0 0 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.board-status { color: var(--muted); font-size: 13px; }
.board-rows { display: grid; gap: 6px; }
.tier-row { display: grid; grid-template-columns: 100px minmax(0, 1fr); border: 1px solid #393c47; border-radius: 12px; min-height: 80px; background: #191c24; }
.tier-label { color: var(--tier-ink, #212128); display: flex; flex-direction: column; gap: 7px; align-items: center; justify-content: center; border-radius: 10px 0 0 10px; padding: 8px 7px; text-align: center; font-size: 19px; font-weight: 850; background: var(--tier-color, #d8fa72); overflow-wrap: anywhere; }
.tier-label-main, .tier-label-controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; width: 100%; min-width: 0; }
.tier-label input:not([type="color"]) { min-height: 25px; padding: 2px 4px; text-align: center; background: #1c2028e8; color: #fff; font-size: 13px; border: 0; }
.tier-label input[type="color"] { width: 25px; height: 25px; padding: 1px; border: 0; border-radius: 5px; }
.tier-label button { color: #fff; background: #242731de; border-color: #0005; min-height: 23px; padding: 1px 4px; font-size: 11px; }
.tier-label .tier-edit { min-width: 40px; min-height: 30px; }
.tier-label .tier-edit:hover { background: #242731; }
.tier-label .tier-edit:focus-visible { outline-color: var(--tier-ink, #212128); outline-offset: 2px; }
.tier-settings-colors { display: grid; gap: 8px; }
.tier-field-title, .tier-custom-color { font-size: 14px; font-weight: 600; }
.tier-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tier-swatches .tier-swatch { min-height: 42px; padding: 0; border-color: #ffffff30; background: var(--swatch-color); color: transparent; font-size: 19px; }
.tier-swatches .tier-swatch:hover { border-color: #242731; }
.tier-swatches .tier-swatch[aria-pressed="true"] { color: #161821; outline: 2px solid var(--swatch-color); outline-offset: 2px; }
.tier-swatches .tier-swatch:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tier-custom-color { display: flex; align-items: center; gap: 10px; }
.tier-custom-color input { cursor: pointer; width: 52px; height: 42px; padding: 2px; border: 1px solid #454a58; border-radius: 8px; background: #14171e; }
.tier-color-value { color: var(--muted); font-family: ui-monospace, monospace; font-size: 12px; }
.tier-settings-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.tier-settings-delete { margin-inline-start: auto; }
@media (pointer: coarse) {
  .tier-label .tier-edit { min-width: 42px; min-height: 40px; }
}
.tier-cards, .card-grid { padding: 7px; display: flex; flex-wrap: wrap; align-content: flex-start; align-items: flex-start; gap: 6px; min-width: 0; min-height: 72px; }
.tier-empty { color: #a0a6b1; padding: 15px 10px; font-size: 13px; }
.tier-unranked { margin-top: 15px; border: 1px dashed #454958; border-radius: 12px; padding: 9px; background: #181b22; }
.tier-unranked h2, .tier-unranked h3 { margin: 4px 6px 7px; font-size: 14px; font-weight: 750; }
.tier-add { margin: 9px 0 0; }
.tier-card-stack { min-width: 0; }
.tier-card-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 3px 7px 7px;
  color: var(--muted);
  font-size: 12px;
}
.tier-card-pager[hidden] { display: none; }
.tier-card-pager button { padding: 5px 7px; }
.board-card {
  position: relative;
  flex: 0 0 128px;
  width: 128px;
  aspect-ratio: 1;
  isolation: isolate;
  border-radius: 8px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.board-rank .board-card, .board-design .board-card,
.board-rank .card-face, .board-design .card-face { cursor: grab; }
/* Allow the browser to scroll until a long press claims the gesture. */
.board-rank .card-face, .board-design .card-face {
  touch-action: manipulation;
}
.board-dragging, .board-dragging .card-face { cursor: grabbing; }
.card-face, .card-face:hover {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background: #232733;
  color: #f8f9fb;
  text-align: center;
}
.card-face > * { grid-area: 1 / 1; }
.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}
.card-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #49554b, #242938);
  color: #d8e19e35;
  font-size: 56px;
  font-weight: 800;
}
.card-title {
  z-index: 2;
  width: calc(100% - 14px);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  padding: 4px;
  border-radius: 5px;
  background: rgb(13 16 24 / 77%);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-wrap: pretty;
  pointer-events: none;
}
.card-source {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 1px 4px;
  border-radius: 3px;
  background: #151821c7;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  pointer-events: none;
}
.card-menu {
  position: absolute;
  z-index: 5;
  top: 3px;
  right: 3px;
}
.card-menu summary {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #ffffff61;
  border-radius: 7px;
  background: #151820e8;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  list-style: none;
  opacity: 0;
  cursor: pointer;
}
.card-menu summary::-webkit-details-marker { display: none; }
.board-card:hover .card-menu summary, .board-card:focus-within .card-menu summary,
.card-menu[open] summary { opacity: 1; }
.card-controls {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 78px;
  padding: 4px;
  border: 1px solid #555b6a;
  border-radius: 7px;
  background: #252a35;
  box-shadow: 0 10px 24px #0008;
}
.card-controls button { width: 100%; min-height: 32px; }
.board-card:has(.card-menu[open]) { z-index: 4; }
.card-drag-ready .card-face { outline: 2px dashed var(--accent); outline-offset: -5px; }
.card-drag-source { display: none; }
.card-drop-preview { opacity: .44; outline: 2px dashed var(--accent); outline-offset: -2px; pointer-events: none; }
.card-drop-preview .card-menu { display: none; }
.card-drag-follower {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  opacity: .62;
  box-shadow: 0 8px 24px #0009;
  pointer-events: none;
}
.tier-drop-target { background-color: #2f382955; }
.board-card.card-found .card-face { outline: 3px solid var(--accent); outline-offset: -3px; }
@media (hover: none), (pointer: coarse) {
  .card-menu summary { opacity: 1; width: 40px; height: 40px; }
}
.board-add-card { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.board-add-card label { display: grid; gap: 4px; font-size: 13px; }
.board-youtube-add { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.board-youtube-add h4 { margin-bottom: 8px; font-size: 15px; }
.board-youtube-form { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.board-youtube-form label { flex: 1 1 240px; display: grid; gap: 4px; min-width: 0; font-size: 13px; }
.board-youtube-form label input { min-width: 0; }
.board-youtube-form .board-status { flex-basis: 100%; }
.board-youtube-form .board-status:empty { display: none; }
@media (max-width: 900px) {
  .hero { gap: 30px; min-height: 450px; }
  .hero::before { inset: 0; }
  .preview-tier { min-height: 44px; }
  .preview-tier > strong, .preview-tier > span:first-child, .preview-tier > b:first-child, .preview-label { min-height: 44px; width: 38px; flex-basis: 38px; }
  .preview-tile { width: min(36px, 12vw); }
}
@media (max-width: 650px) {
  main, .header-inner, .site-footer > div { width: calc(100% - 36px); }
  .header-inner { min-height: 57px; gap: 14px; }
  .site-brand { font-size: 22px; gap: 6px; }
  .brand-mark { width: 25px; height: 25px; padding-left: 5px; }
  .site-nav { gap: 11px; }
  .site-nav a { font-size: 12px; }
  .account-controls { gap: 3px; max-width: 50%; min-width: 0; }
  .account-controls .button, .account-controls button { padding: 5px 6px; font-size: 11px; min-height: 34px; }
  .hero { display: grid; grid-template-columns: 1fr; gap: 39px; padding: 48px 0 39px; min-height: 0; }
  .hero h1 { font-size: clamp(43px, 12vw, 70px); }
  .hero-copy p { margin-top: 16px; }
  .hero-actions { margin-top: 21px; gap: 8px; }
  .hero-actions .button { min-height: 43px; padding: 0 10px; }
  .hero-preview { width: calc(100% - 16px); margin: 0 auto; transform: rotate(-3deg); }
  .home-section { margin-top: 22px; }
  .page-shell { padding-top: 26px; }
  .panel { padding: 13px; }
  .tier-row { grid-template-columns: 54px minmax(0, 1fr); gap: 0; }
  .tier-label { padding: 4px 2px; font-size: 15px; }
  .tier-label input:not([type="color"]) { font-size: 12px; }
  .tier-cards, .card-grid { gap: 5px; padding: 5px; }
  .tier-unranked { padding: 5px; }
  .site-footer { margin-top: 42px; }
}
@media (max-width: 520px) {
  .header-inner { flex-wrap: wrap; row-gap: 0; padding-top: 6px; }
  .site-nav { order: 1; width: 100%; gap: 20px; }
  .site-nav a { padding-block: 10px; white-space: nowrap; }
}
@media (max-width: 365px) {
  .tier-row { grid-template-columns: 48px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
.preview-dots { display: flex; gap: 4px; }
.preview-dots i { display: block; width: 6px; height: 6px; border-radius: 50%; background: #626976; }
.preview-dots i:first-child { background: #d8fa72; }
.preview-name { margin-right: auto; padding-left: 7px; }
.preview-tile { display: grid; place-items: end start; padding: 4px; color: #f9f6ed; font-size: 9px; font-weight: 850; letter-spacing: -.2px; isolation: isolate; }
.preview-tile::before { z-index: -1; pointer-events: none; }
.card-art-status {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: none;
  justify-items: center;
  align-content: end;
  grid-auto-flow: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding-bottom: 21px;
  background: rgb(12 14 19 / 34%);
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  pointer-events: none;
}
.card-art-status > span {
  background: #14171ddf;
  border-radius: 4px;
  padding: 2px 4px;
}
.card-playing .card-art-status { display: grid; }
.card-art-status-icon {
  display: grid;
  place-items: center;
  width: 17px;
  height: 19px;
}
.card-art-status-icon::before {
  content: "";
  width: 8px;
  height: 9px;
  border-inline: 2px solid currentColor;
}
.board-design .tier-row { grid-template-columns: minmax(104px, 20%) minmax(0, 1fr); }
.board-count { font-size: 13px; color: #d7e3bd; }
