/* MakeTag Play cabinet — the maketag.app look: near-black, light pill buttons, hairlines, Helvetica Neue / Arial */
:root {
  --bg: #0a0a0c; --ink: #f2f2f4; --ink-soft: #cbcbd1; --muted: #a3a3ad; --faint: #797983;
  --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .17); --panel: #111013; --panel-2: #16151a; --wash: rgba(255, 255, 255, .045); --light: #f4f4f6;
  --ok: #22c55e; --warn: #f59e0b; --bad: #ef4444; --blurple: #5865f2;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15.5px; line-height: 1.55; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
img { display: block; }

/* top row */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px max(16px, env(safe-area-inset-left)); background: rgba(6, 7, 9, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 17px; letter-spacing: -.01em; }
.brand b { font-weight: 700; }
.top-r { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lang { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--line-2); }
.lang button { height: 28px; padding: 0 11px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.lang button.on { background: var(--light); color: #0a0a0c; }
.me { display: flex; align-items: center; gap: 8px; min-width: 0; }
.me img { width: 30px; height: 30px; border-radius: 50%; background: var(--panel); }
.me .nm { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--ink-soft); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); font-size: 14.5px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, opacity .15s; }
.btn:hover { background: var(--wash); border-color: rgba(255, 255, 255, .28); }
.btn.primary { background: var(--light); color: #0a0a0c; border-color: var(--light); }
.btn.primary:hover { background: #fff; }
.btn.danger { color: #fca5a5; border-color: rgba(239, 68, 68, .45); }
.btn.danger:hover { background: rgba(239, 68, 68, .1); }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-soft); font-size: 13px; cursor: pointer; }
.chip:hover { color: var(--ink); background: var(--wash); }
.chip.on { background: var(--light); color: #0a0a0c; border-color: var(--light); }

/* layout */
.wrap { max-width: 1140px; margin: 0 auto; padding: 28px max(16px, env(safe-area-inset-left)) 80px; }
.grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; }
@media (max-width: 860px) { .grid { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
.side-t { margin: 0 0 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.guilds { display: grid; gap: 4px; }
@media (max-width: 860px) { .guilds { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; scrollbar-width: none; } .guilds::-webkit-scrollbar { display: none; } }
.g { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; border: 1px solid transparent; background: none; cursor: pointer; text-align: left; min-width: 0; }
.g:hover { background: var(--wash); }
.g.on { background: var(--panel-2); border-color: var(--line-2); }
.g img, .g .gi { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--panel-2); display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.g .gn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.g small { display: block; color: var(--faint); font-size: 12px; }
@media (max-width: 860px) { .g { flex: none; max-width: 220px; border-color: var(--line); } }

h1 { margin: 0; font-size: clamp(28px, 4.4vw, 42px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
h2 { margin: 0 0 14px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
h3 { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.lead { margin: 12px 0 0; max-width: 680px; color: var(--muted); font-size: 16.5px; }
.muted { color: var(--muted); }
.sm { font-size: 13px; }
.sec { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sp { flex: 1; }

/* panel */
.panel { border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel); padding: 18px; }
.panel + .panel { margin-top: 14px; }

/* create box */
.create textarea { width: 100%; min-height: 120px; resize: vertical; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: #0b0b0e; color: var(--ink); font-size: 15.5px; line-height: 1.55; outline: none; }
.create textarea:focus { border-color: rgba(255, 255, 255, .4); }
.ideas { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 14px; }
.count { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* energy */
.energy { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.energy .bar { width: 120px; height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.energy .bar i { display: block; height: 100%; background: var(--light); border-radius: 99px; }

/* tabs */
.tabs { display: flex; gap: 4px; margin: 22px 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { padding: 10px 14px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-weight: 600; font-size: 14.5px; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }

/* function cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; text-align: left; transition: border-color .15s, background .15s; min-width: 0; }
.card:hover { border-color: rgba(255, 255, 255, .3); background: var(--panel-2); }
.card .em { font-size: 26px; line-height: 1; }
.card .tt { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .ds { color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line-2); font-size: 11.5px; font-weight: 600; color: var(--ink-soft); }
.badge.ok { color: #86efac; border-color: rgba(34, 197, 94, .4); }
.badge.warn { color: #fcd34d; border-color: rgba(245, 158, 11, .4); }
.badge.bad { color: #fca5a5; border-color: rgba(239, 68, 68, .4); }
code, .code { font-family: var(--mono); font-size: .9em; }
.ic { padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08); }
.empty { padding: 34px 18px; border: 1px dashed var(--line-2); border-radius: 16px; text-align: center; color: var(--muted); }

/* the function page */
.fhead { display: flex; align-items: flex-start; gap: 14px; }
.fhead .em { font-size: 40px; line-height: 1; }
.fhead .tt { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 0; font-size: 14px; }
.back:hover { color: var(--ink); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); } }
.kv { display: grid; gap: 10px; }
.kv div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.kv span:first-child { color: var(--muted); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.switch:first-child { border-top: 0; }
.tog { position: relative; width: 42px; height: 24px; flex: none; border-radius: 99px; background: var(--line-2); border: 0; cursor: pointer; transition: background .15s; }
.tog::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.tog.on { background: var(--ok); }
.tog.on::after { transform: translateX(18px); }
.tog[disabled] { opacity: .4; pointer-events: none; }

.editor { width: 100%; min-height: 460px; resize: vertical; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: #0b0b0e; color: #e5e5ea; font-family: var(--mono); font-size: 13px; line-height: 1.6; tab-size: 2; white-space: pre; outline: none; }
.hist { display: grid; gap: 8px; }
.hist .h { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.hist .v { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.hist .p { flex: 1; min-width: 0; font-size: 14px; }
.hist .p small { display: block; color: var(--faint); }

/* the Discord-like preview */
.dc { border-radius: 14px; background: #313338; color: #dbdee1; font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; overflow: hidden; border: 1px solid rgba(255, 255, 255, .06); }
.dc-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #2b2d31; border-bottom: 1px solid #1f2023; font-size: 14px; color: #f2f3f5; font-weight: 600; }
.dc-bar .hash { color: #80848e; font-size: 20px; font-weight: 400; line-height: 1; }
.dc-log { max-height: 560px; min-height: 220px; overflow-y: auto; padding: 8px 0 14px; }
.dc-msg { display: flex; gap: 14px; padding: 8px 16px; }
.dc-msg:hover { background: #2e3035; }
.dc-av { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--blurple); display: grid; place-items: center; overflow: hidden; }
.dc-av img { width: 40px; height: 40px; }
.dc-body { min-width: 0; flex: 1; }
.dc-name { font-weight: 600; color: #f2f3f5; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.dc-tag { font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 4px; background: var(--blurple); color: #fff; }
.dc-eph { margin-top: 4px; font-size: 12px; color: #949ba4; }
.dc-text { white-space: pre-wrap; word-wrap: break-word; font-size: 15px; line-height: 1.375; }
.dc-text code { background: #2b2d31; padding: 1px 4px; border-radius: 4px; }
.dc-ment { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }
.dc-embed { display: grid; max-width: 520px; margin-top: 6px; border-radius: 4px; background: #2b2d31; border-left: 4px solid #1e1f22; padding: 10px 14px 12px 12px; gap: 6px; }
.dc-embed .et { font-weight: 600; color: #f2f3f5; font-size: 15px; }
.dc-embed .ed { font-size: 14px; white-space: pre-wrap; }
.dc-embed .ef { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dc-embed .ef > div { grid-column: span 3; min-width: 0; }
.dc-embed .ef > div.in { grid-column: span 1; }
.dc-embed .ef b { display: block; font-size: 13.5px; color: #f2f3f5; }
.dc-embed .ef span { font-size: 14px; white-space: pre-wrap; }
.dc-embed .eft { font-size: 12px; color: #b5bac1; }
.dc-embed .eimg { max-width: 100%; border-radius: 4px; margin-top: 4px; }
.dc-embed .eth { float: right; width: 64px; height: 64px; border-radius: 4px; margin-left: 10px; object-fit: cover; }
.dc-comps { display: grid; gap: 8px; margin-top: 8px; }
.dc-row { display: flex; flex-wrap: wrap; gap: 8px; }
.dc-btn { height: 32px; padding: 2px 16px; border-radius: 3px; border: 0; font-size: 14px; font-weight: 500; color: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.dc-btn.s1 { background: #5865f2; } .dc-btn.s1:hover { background: #4752c4; }
.dc-btn.s2 { background: #4e5058; } .dc-btn.s2:hover { background: #6d6f78; }
.dc-btn.s3 { background: #248046; } .dc-btn.s3:hover { background: #1a6334; }
.dc-btn.s4 { background: #da373c; } .dc-btn.s4:hover { background: #a12828; }
.dc-btn.s5 { background: #4e5058; }
.dc-btn[disabled] { opacity: .5; cursor: not-allowed; }
.dc-sel { width: 100%; max-width: 400px; height: 40px; padding: 0 10px; border-radius: 4px; border: 1px solid #1e1f22; background: #1e1f22; color: #dbdee1; }
.dc-modal { max-width: 440px; margin-top: 8px; padding: 16px; border-radius: 8px; background: #313338; border: 1px solid #1e1f22; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.dc-modal h4 { margin: 0 0 12px; color: #f2f3f5; }
.dc-modal label { display: block; margin: 10px 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: #b5bac1; }
.dc-modal input, .dc-modal textarea { width: 100%; padding: 10px; border-radius: 4px; border: 0; background: #1e1f22; color: #dbdee1; }
.dc-acts { margin-top: 6px; font-size: 12.5px; color: #949ba4; }
.dc-acts code { color: #c9cdfb; }
.dc-err { color: #fca5a5; font-family: var(--mono); font-size: 13px; white-space: pre-wrap; }
.dc-args { display: grid; gap: 8px; padding: 12px 16px; border-top: 1px solid #1f2023; background: #2b2d31; }
.dc-args .ar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dc-args input { height: 36px; padding: 0 10px; border-radius: 6px; border: 0; background: #1e1f22; color: #dbdee1; min-width: 120px; flex: 1; }

/* forms */
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field input, .field textarea { height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: #0b0b0e; outline: none; }
.field textarea { height: auto; min-height: 100px; padding: 10px 12px; resize: vertical; }

/* gate */
.gate .sp-list { display: grid; gap: 8px; margin: 14px 0; }
.gate .spn { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; }
.gate .spn:hover { background: var(--wash); }
.gate .spn img, .gate .spn .gi { width: 36px; height: 36px; border-radius: 10px; background: var(--panel-2); flex: none; }
.gate .spn .st { margin-left: auto; font-size: 13px; color: var(--muted); }
.gate .spn.done .st { color: #86efac; }

/* hero (signed out) */
.hero { padding: 60px 0 20px; text-align: left; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 30px; }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.step { padding: 18px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel); }
.step b { display: block; margin-bottom: 6px; }

/* misc */
.loading { display: grid; place-items: center; min-height: 50vh; }
.spin { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--ink); animation: sp 0.8s linear infinite; display: inline-block; vertical-align: middle; }
.spin.sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes sp { to { transform: rotate(360deg); } }
.working { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); margin-top: 14px; }
.toast { position: fixed; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 14px; background: var(--light); color: #0a0a0c; font-size: 14.5px; font-weight: 500; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.toast.bad { background: #fecaca; }
.note { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--wash); font-size: 14px; color: var(--ink-soft); }
.note.warn { border-color: rgba(245, 158, 11, .4); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: 2s !important; } }

/* fixes after the first screenshots */
#who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.grid > * { min-width: 0; }
.chip { height: auto; min-height: 30px; padding: 5px 12px; text-align: left; line-height: 1.35; }
@media (max-width: 640px) {
  .top { padding-top: 10px; padding-bottom: 10px; }
  .brand span { display: none; }
  .me .nm { display: none; }
  .top-r { gap: 6px; }
  .btn.sm { padding: 0 11px; }
  .panel { padding: 14px; }
  .fhead .tt { font-size: 21px; }
  .dc-msg { gap: 10px; padding: 8px 10px; }
  .dc-av, .dc-av img { width: 34px; height: 34px; }
}
