:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #050505;
  color: #f5f5f5;
  font-synthesis: none;
  --panel: #0b0b0c;
  --panel-raised: #111113;
  --muted: #8a8a8f;
  --faint: #5f6065;
  --line: #242428;
  --line-strong: #333338;
  --accent: #efefef;
}

* { box-sizing: border-box; }
html { background: #050505; }
body { margin: 0; min-width: 320px; min-height: 100vh; background:
  radial-gradient(circle at 50% -20%, rgba(255,255,255,.055), transparent 30rem),
  #050505; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.shell { width: min(1080px, calc(100% - 40px)); margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #151517; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: #ededee; text-decoration: none; font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.brand-mark { width: 25px; height: 25px; border: 1px solid #37373b; border-radius: 7px; display: grid; grid-template-columns: 1fr 1fr; place-items: center; padding: 5px; gap: 3px; background: #0b0b0c; }
.brand-mark span { width: 5px; height: 5px; border-radius: 50%; background: #d9d9dc; }
.icon-button { width: 36px; height: 36px; border-radius: 9px; border: 1px solid #28282c; background: #101012; display: grid; place-items: center; cursor: pointer; }
.icon-button.quiet { background: transparent; border-color: transparent; color: #77777d; }
.icon-button:hover { color: #fff; border-color: #38383d; background: #121214; }
.icon-button svg, .copy-button svg, .primary-button svg, .secondary-button svg, .note-box > svg, .toast svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.hero { padding: 90px 0 56px; max-width: 720px; }
.eyebrow { color: #85858b; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: 11px; margin-bottom: 19px; }
h1 { margin: 0; font-size: clamp(38px, 5vw, 68px); line-height: .98; letter-spacing: -.055em; font-weight: 720; max-width: 760px; }
.hero p { margin: 25px 0 0; max-width: 650px; color: #98989d; font-size: 16px; line-height: 1.65; letter-spacing: -.012em; }

.workspace { border: 1px solid #1e1e21; border-radius: 16px; background: rgba(10,10,11,.82); overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.32); }
.tabbar { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid #1d1d20; background: #080809; }
.tab { border: 0; border-radius: 8px; padding: 9px 12px; background: transparent; color: #737379; font-size: 12px; font-weight: 650; cursor: pointer; }
.tab:hover { color: #b8b8bc; }
.tab.active { color: #ededee; background: #171719; box-shadow: inset 0 0 0 1px #252529; }

.preview-grid { display: grid; grid-template-columns: 1.05fr 1.1fr; min-height: 500px; }
.profile-card { margin: 28px; border-radius: 14px; border: 1px solid #26262a; background: #141416; overflow: hidden; align-self: start; box-shadow: 0 12px 30px rgba(0,0,0,.22); }
.profile-banner { height: 118px; background: linear-gradient(145deg, #1f1f22 0%, #171719 50%, #121214 100%); border-bottom: 1px solid #232327; position: relative; }
.profile-banner::after { content:""; position: absolute; inset: 0; opacity: .16; background-image: radial-gradient(circle at 20% 20%, #fff 0 1px, transparent 1px), radial-gradient(circle at 80% 70%, #fff 0 1px, transparent 1px); background-size: 26px 26px, 31px 31px; }
.profile-body { position: relative; padding: 58px 22px 22px; }
.avatar-wrap { position: absolute; left: 22px; top: -42px; width: 84px; height: 84px; border-radius: 50%; padding: 6px; background: #141416; }
.avatar { width: 72px; height: 72px; border-radius: 50%; display: block; border: 1px solid #2e2e33; }
.status-dot { position: absolute; right: 4px; bottom: 7px; width: 19px; height: 19px; border-radius: 50%; background: #5b5b60; border: 5px solid #141416; }
.profile-heading strong { display: block; font-size: 19px; letter-spacing: -.025em; overflow-wrap: anywhere; }
.profile-heading span { display: block; margin-top: 4px; color: #8b8b91; font-size: 13px; overflow-wrap: anywhere; }
.separator { height: 1px; background: #29292d; margin: 21px 0; }
.profile-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #818188; }
.profile-meta strong { color: #b9b9bd; font-weight: 600; }
.profile-note { margin: 18px 0 0; color: #6f6f75; font-size: 12px; }

.output-panel { border-left: 1px solid #1e1e21; padding: 34px; display: flex; flex-direction: column; justify-content: center; }
.field-block + .field-block { margin-top: 23px; }
.field-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 9px; }
.field-label-row label { color: #cdcdcf; font-size: 12px; font-weight: 650; }
.field-label-row span { color: #5f5f65; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.copy-field { min-height: 52px; border-radius: 10px; border: 1px solid #29292d; background: #0b0b0d; padding: 7px 7px 7px 14px; display: flex; align-items: center; gap: 10px; }
.copy-field code { min-width: 0; flex: 1; color: #efeff0; font: 500 13px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.copy-button { border: 1px solid #2c2c30; background: #161618; border-radius: 8px; padding: 8px 10px; display: flex; align-items: center; gap: 7px; color: #a9a9ae; font-size: 11px; cursor: pointer; }
.copy-button:hover { color: #fff; border-color: #414146; }
.copy-button svg { width: 14px; height: 14px; }

.note-box { margin-top: 24px; border: 1px solid #232327; border-radius: 10px; background: #0d0d0f; padding: 13px 14px; display: grid; grid-template-columns: 18px 1fr; gap: 10px; color: #707076; }
.note-box > svg { margin-top: 2px; }
.note-box p { margin: 0; font-size: 11px; line-height: 1.55; }
.note-box code { color: #a9a9ae; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.note-box.compact { margin-top: 24px; }
.action-row { display: flex; gap: 10px; margin-top: 22px; }
.primary-button, .secondary-button { min-height: 42px; border-radius: 9px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 14px; font-size: 12px; font-weight: 670; cursor: pointer; }
.primary-button { background: #ececee; color: #09090a; flex: 1; }
.primary-button:hover:not(:disabled) { background: #fff; }
.primary-button:disabled { cursor: wait; opacity: .52; }
.secondary-button { background: #151517; border-color: #29292d; color: #b9b9bd; }
.secondary-button:hover { color: #fff; border-color: #414146; }
.secondary-button.full { width: 100%; margin-top: 8px; }
.cooldown { margin-left: auto; font-variant-numeric: tabular-nums; opacity: .55; font-size: 10px; }

.message-state { display: grid; grid-template-columns: 1.15fr .85fr; min-height: 440px; }
.message-preview { padding: 50px; display: flex; gap: 16px; align-items: flex-start; border-right: 1px solid #1e1e21; align-self: stretch; }
.message-avatar { width: 42px; height: 42px; border-radius: 50%; flex: none; }
.message-name { font-weight: 700; font-size: 14px; }
.message-time { margin-left: 8px; color: #5f5f65; font-weight: 500; font-size: 10px; }
.message-preview p { margin: 6px 0 0; color: #a2a2a7; font-size: 13px; line-height: 1.55; }
.message-details { padding: 38px; align-self: center; }
.detail-row { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid #222226; font-size: 12px; }
.detail-row span { color: #6d6d73; }
.detail-row strong { color: #c4c4c8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; text-align: right; }

footer { margin-top: auto; padding: 34px 0 28px; display: flex; justify-content: space-between; gap: 20px; color: #4f4f55; font-size: 10px; text-transform: uppercase; letter-spacing: .085em; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); padding: 10px 13px; border: 1px solid #333338; border-radius: 9px; background: #151517; box-shadow: 0 10px 30px rgba(0,0,0,.35); display: flex; align-items: center; gap: 8px; color: #d7d7da; font-size: 11px; opacity: 0; pointer-events: none; transition: .18s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 14px; height: 14px; }

dialog { width: min(470px, calc(100% - 32px)); border: 1px solid #2b2b30; border-radius: 14px; background: #101012; color: #e7e7e9; padding: 22px; box-shadow: 0 30px 100px rgba(0,0,0,.7); }
dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(4px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.dialog-head strong { font-size: 16px; }
.dialog-head .icon-button { border: 0; background: transparent; font-size: 22px; color: #77777d; }
dialog p { color: #909097; font-size: 12px; line-height: 1.65; }
dialog code { color: #d2d2d5; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 820px) {
  .hero { padding-top: 62px; }
  .preview-grid, .message-state { grid-template-columns: 1fr; }
  .output-panel { border-left: 0; border-top: 1px solid #1e1e21; }
  .message-preview { border-right: 0; border-bottom: 1px solid #1e1e21; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 24px, 1080px); }
  .topbar { height: 64px; }
  .hero { padding: 48px 2px 38px; }
  h1 { font-size: 42px; }
  .hero p { font-size: 14px; }
  .profile-card { margin: 14px; }
  .output-panel, .message-details { padding: 24px 18px; }
  .message-preview { padding: 28px 18px; }
  .action-row { flex-direction: column; }
  .field-label-row span { display: none; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
