:root {
  --ink: #12141e;
  --muted: #77818a;
  --violet: #728b9b;
  --violet-soft: #eef4f7;
  --line: rgba(69,82,91,.14);
  --dark: #171d22;
  --green: #5aa978;
  --red: #d5576d;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: radial-gradient(circle at 87% 3%,#dce9ee 0,transparent 28%),radial-gradient(circle at 8% 48%,#fff 0,transparent 31%),#f2f6f8; font-family: Inter,"SF Pro Display","Helvetica Neue",Arial,sans-serif; -webkit-font-smoothing: antialiased; }
button,input,textarea,select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.system-header { position: sticky; z-index: 30; top: 14px; width: min(1320px,calc(100% - 28px)); height: 68px; margin: 14px auto 0; padding: 0 13px 0 23px; border: 1px solid rgba(255,255,255,.96); border-radius: 21px; display: flex; align-items: center; justify-content: space-between; gap: 15px; background: rgba(255,255,255,.7); box-shadow: 0 15px 44px rgba(65,82,91,.1),inset 0 1px 0 #fff; backdrop-filter: blur(24px) saturate(125%); }
.system-logo { font-size: 26px; font-weight: 900; letter-spacing: -.075em; }
.system-logo span { color: var(--violet); }
.system-header nav { display: flex; align-items: center; gap: 8px; }
.header-link { min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #555c70; background: rgba(255,255,255,.72); font-size: 10px; font-weight: 750; }
.header-link.dark { border-color: transparent; color: #fff; background: #171a25; }
.system-main { width: min(1320px,calc(100% - 28px)); margin: 28px auto 42px; }
.system-layout { min-height: 720px; display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 16px; }
.system-art { position: relative; min-height: 620px; padding: clamp(30px,5vw,64px); border: 1px solid rgba(255,255,255,.96); border-radius: 31px; overflow: hidden; color: var(--ink); background: rgba(247,251,252,.9); box-shadow: 0 30px 85px rgba(63,81,91,.14),inset 0 1px 0 #fff; }
.system-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .58; filter: saturate(.2) brightness(1.38) contrast(.82); }
.system-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg,rgba(255,255,255,.08),rgba(244,249,251,.97)); }
.system-art-copy { position: absolute; z-index: 2; left: clamp(30px,5vw,64px); right: clamp(30px,5vw,64px); bottom: clamp(30px,5vw,64px); }
.system-kicker { color: #6d8796; font-size: 9px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.system-art h1,.system-panel h1 { margin: 14px 0 13px; font-size: clamp(44px,5vw,75px); line-height: .91; letter-spacing: -.065em; }
.system-art p { max-width: 560px; margin: 0; color: #6f7b84; line-height: 1.55; }
.system-panel { min-height: 620px; padding: clamp(28px,5vw,65px); border: 1px solid #fff; border-radius: 31px; background: rgba(250,251,255,.84); box-shadow: 0 30px 85px rgba(55,64,113,.12); backdrop-filter: blur(22px); }
.system-panel.narrow { display: grid; align-content: center; }
.system-panel h1 { font-size: clamp(41px,4.6vw,67px); }
.system-panel > p,.panel-lead { max-width: 650px; margin: 0 0 28px; color: var(--muted); line-height: 1.55; }
.system-form { display: grid; gap: 14px; }
.system-form label { display: grid; gap: 7px; color: #73798b; font-size: 10px; }
.system-form input,.system-form textarea,.system-form select { width: 100%; min-height: 54px; padding: 0 15px; border: 1px solid var(--line); border-radius: 14px; outline: 0; background: rgba(255,255,255,.86); }
.system-form textarea { min-height: 135px; padding-block: 14px; resize: vertical; line-height: 1.5; }
.system-form input:focus,.system-form textarea:focus,.system-form select:focus { border-color: #8ca4b1; box-shadow: 0 0 0 4px rgba(111,139,155,.1); }
.system-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.system-grid .wide { grid-column: 1/-1; }
.primary-action,.secondary-action,.danger-action { min-height: 52px; padding: 0 18px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; text-align: center; font-size: 11px; font-weight: 800; }
.primary-action { border: 1px solid rgba(255,255,255,.28); color: #fff; background: linear-gradient(135deg,rgba(48,61,70,.96),#171d22); box-shadow: 0 15px 31px rgba(38,50,58,.2),inset 0 1px 0 rgba(255,255,255,.22); }
.secondary-action { border: 1px solid var(--line); color: #1a1c26; background: rgba(255,255,255,.8); }
.danger-action { border: 0; color: #b13c53; background: #ffedf1; }
.action-row { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 9px; }
.action-row > * { min-width: 160px; }
.fine-note { margin-top: 13px; color: #9599a9; font-size: 9px; line-height: 1.5; }
.code-row { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; margin: 22px 0; }
.code-row input { min-width: 0; width: 100%; aspect-ratio: 1; border: 1px solid #d9dbe6; border-radius: 13px; outline: 0; background: #fff; text-align: center; font-size: 22px; font-weight: 800; }
.code-row input:focus { border-color: #8ca4b1; box-shadow: 0 0 0 4px rgba(111,139,155,.1); }
.status-orbit { position: relative; width: 150px; height: 150px; margin: 0 0 25px; border-radius: 38px; overflow: hidden; box-shadow: 0 22px 55px rgba(34,38,64,.2); }
.status-orbit img { width: 100%; height: 100%; object-fit: cover; }
.status-list { margin: 24px 0; display: grid; gap: 9px; }
.status-list div { min-height: 56px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.72); }
.status-list i { width: 10px; height: 10px; border-radius: 50%; background: #73d2bd; box-shadow: 0 0 0 5px rgba(115,210,189,.12); }
.status-list div.pending i { background: #7d9aaa; box-shadow: 0 0 0 5px rgba(125,154,170,.13); }
.status-list b { display: block; font-size: 11px; }
.status-list span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.reason-card { margin: 20px 0; padding: 18px; border-left: 3px solid #dd5c72; border-radius: 0 15px 15px 0; background: #fff0f3; }
.reason-card b { font-size: 12px; }
.reason-card p { margin: 7px 0 0; color: #777d8f; font-size: 11px; line-height: 1.5; }

.error-page { min-height: calc(100vh - 124px); display: grid; grid-template-columns: minmax(390px,.82fr) minmax(0,1.18fr); align-items: center; gap: 16px; }
.error-copy { min-width: 0; padding: clamp(25px,4vw,58px); }
.error-code { display: inline-flex; padding: 8px 11px; border: 1px solid rgba(130,154,167,.27); border-radius: 999px; color: #557080; background: rgba(255,255,255,.72); box-shadow: inset 0 1px 0 #fff; backdrop-filter: blur(14px); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.error-copy h1 { margin: 20px 0 15px; font-size: clamp(54px,5.8vw,84px); line-height: .87; letter-spacing: -.07em; overflow-wrap: anywhere; }
.error-copy p { max-width: 520px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.error-visual { position: relative; min-height: 0; aspect-ratio: 3/2; border: 1px solid rgba(255,255,255,.96); border-radius: 34px; overflow: hidden; background: rgba(255,255,255,.82); box-shadow: 0 34px 90px rgba(64,82,92,.16),inset 0 1px 0 #fff; }
.error-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tiny-joke { margin-top: 18px; color: #9a9eae; font-size: 10px; }

.wide-panel { padding: clamp(22px,3vw,36px); border: 1px solid #fff; border-radius: 28px; background: rgba(250,251,255,.82); box-shadow: 0 22px 70px rgba(55,64,113,.1); backdrop-filter: blur(22px); }
.page-head { margin-bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.page-head h1 { margin: 8px 0 0; font-size: clamp(43px,5vw,72px); line-height: .93; letter-spacing: -.06em; }
.page-head p { max-width: 620px; margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.filter-row { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-row button { min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; color: #6f7588; background: white; font-size: 9px; font-weight: 750; }
.filter-row button.active { border-color: #2e3a42; color: white; background: #2e3a42; }
.notification-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 15px; align-items: start; }
.notification-list { display: grid; gap: 8px; }
.notification-item { padding: 15px; border: 1px solid var(--line); border-radius: 16px; display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 13px; background: rgba(255,255,255,.72); }
.notification-item.unread { border-color: #cbdce4; background: #f1f7f9; }
.notification-item img { width: 46px; height: 46px; border-radius: 13px; object-fit: cover; }
.notification-item b { display: block; font-size: 12px; }
.notification-item p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.notification-item time { color: #9b9faf; font-size: 8px; }
.notification-empty { min-height: 380px; display: grid; place-items: center; text-align: center; }
.notification-empty img { width: 150px; height: 150px; margin: auto; border-radius: 31px; object-fit: cover; }
.notification-empty h2 { margin: 18px 0 8px; }
.notification-empty p { margin: 0; color: var(--muted); }
.side-visual-card { position: sticky; top: 105px; min-height: 340px; padding: 22px; border-radius: 24px; overflow: hidden; color: #fff; background: #151823; }
.side-visual-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .65; }
.side-visual-card::after { content:""; position:absolute; inset:0; background: linear-gradient(0deg,rgba(12,14,23,.95),transparent 72%); }
.side-visual-card div { position: absolute; z-index: 2; left: 22px; right: 22px; bottom: 22px; }
.side-visual-card h2 { margin: 0 0 7px; font-size: 23px; }
.side-visual-card p { margin: 0; color: #c1c4d2; font-size: 10px; line-height: 1.5; }

.chat-shell { min-height: calc(100vh - 135px); padding: 0; overflow: hidden; display: grid; grid-template-columns: 320px 1fr; border: 1px solid #fff; border-radius: 28px; background: rgba(250,251,255,.84); box-shadow: 0 22px 70px rgba(55,64,113,.1); }
.chat-sidebar { padding: 20px; border-right: 1px solid var(--line); background: rgba(246,247,252,.7); }
.chat-sidebar h1 { margin: 5px 0 20px; font-size: 31px; letter-spacing: -.05em; }
.chat-search { width: 100%; height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; outline: 0; background: white; }
.conversation-list { margin-top: 13px; display: grid; gap: 6px; }
.conversation { padding: 11px; border: 1px solid transparent; border-radius: 14px; display: grid; grid-template-columns: 42px 1fr; gap: 10px; background: transparent; text-align: left; }
.conversation.active { border-color: #fff; background: #fff; box-shadow: 0 9px 22px rgba(54,60,94,.08); }
.conversation img { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; }
.conversation b { font-size: 11px; }
.conversation span { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.chat-main { min-width: 0; display: grid; grid-template-rows: 72px 1fr auto; }
.chat-head { padding: 0 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.chat-head div { display: grid; gap: 3px; }
.chat-head b { font-size: 13px; }
.chat-head span { color: var(--green); font-size: 8px; }
.chat-messages { min-height: 400px; max-height: calc(100vh - 330px); padding: 22px; overflow: auto; display: grid; align-content: end; gap: 10px; background: radial-gradient(circle at 80% 10%,rgba(133,165,181,.12),transparent 31%); }
.message { max-width: min(560px,78%); padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; background: white; }
.message.mine { justify-self: end; border-color: #43535d; border-radius: 16px 16px 5px 16px; color: white; background: linear-gradient(135deg,#4c606b,#20292f); }
.message p { margin: 0; font-size: 11px; line-height: 1.5; }
.message time { display: block; margin-top: 6px; color: #a2a6b5; font-size: 7px; }
.message.mine time { color: #d9e3e8; }
.file-message { margin-top: 8px; padding: 9px; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 9px; }
.chat-compose { padding: 14px; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto; gap: 8px; background: rgba(255,255,255,.72); }
.chat-compose textarea { min-height: 48px; max-height: 120px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; outline: 0; resize: none; background: white; }
.attach-button,.send-button { min-width: 48px; height: 48px; border: 0; border-radius: 13px; display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.attach-button { position: relative; border: 1px solid var(--line); background: white; }
.attach-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.send-button { padding: 0 17px; color: white; background: #171a25; }

.legal-layout { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 15px; align-items: start; }
.legal-nav { position: sticky; top: 105px; padding: 18px; border: 1px solid #fff; border-radius: 22px; display: grid; gap: 5px; background: rgba(250,251,255,.84); box-shadow: 0 18px 55px rgba(55,64,113,.09); }
.legal-nav b { margin: 7px 9px 14px; font-size: 12px; }
.legal-nav a { padding: 11px; border-radius: 11px; color: #686e81; font-size: 10px; }
.legal-nav a:hover,.legal-nav a.active { color: #171923; background: #fff; }
.legal-article { padding: clamp(25px,5vw,70px); border: 1px solid #fff; border-radius: 28px; background: rgba(250,251,255,.86); box-shadow: 0 22px 70px rgba(55,64,113,.09); }
.legal-article h1 { margin: 10px 0 16px; font-size: clamp(42px,5vw,70px); line-height: .94; letter-spacing: -.06em; overflow-wrap: anywhere; }
.legal-article .updated { color: #999dab; font-size: 9px; }
.legal-article section { max-width: 820px; padding-top: 24px; }
.legal-article h2 { margin: 0 0 10px; font-size: 24px; letter-spacing: -.035em; }
.legal-article h3 { margin: 20px 0 8px; font-size: 15px; }
.legal-article p,.legal-article li { color: #666c7e; font-size: 12px; line-height: 1.7; }
.legal-article ul,.legal-article ol { padding-left: 20px; }
.legal-callout { padding: 16px; border-left: 3px solid #7e9aa9; border-radius: 0 13px 13px 0; background: rgba(238,246,249,.92); }
.system-toast { position: fixed; z-index: 80; left: 50%; bottom: 22px; transform: translate(-50%,20px); padding: 13px 17px; border-radius: 13px; color: white; background: #171a25; box-shadow: 0 16px 42px rgba(19,22,37,.25); opacity: 0; pointer-events: none; transition: .25s; font-size: 10px; }
.system-toast.show { opacity: 1; transform: translate(-50%,0); }

@media(max-width:1000px) {
  .system-layout,.error-page { grid-template-columns: 1fr; }
  .system-art { min-height: 500px; }
  .error-visual { min-height: 0; grid-row: 1; }
  .notification-layout { grid-template-columns: 1fr; }
  .side-visual-card { position: relative; top: 0; min-height: 260px; }
  .chat-shell { grid-template-columns: 250px 1fr; }
  .legal-layout { grid-template-columns: 220px minmax(0,1fr); }
}
@media(max-width:720px) {
  .system-header { top: 8px; width: calc(100% - 16px); height: 60px; margin-top: 8px; padding-left: 16px; }
  .header-link:not(.dark) { display: none; }
  .system-main { width: calc(100% - 16px); margin: 17px auto 20px; }
  .system-layout { min-height: 0; }
  .system-art { min-height: 390px; border-radius: 24px; }
  .system-panel { min-height: 0; padding: 31px 18px; border-radius: 24px; }
  .system-grid { grid-template-columns: 1fr; }
  .system-grid .wide { grid-column: auto; }
  .code-row { gap: 5px; }
  .code-row input { border-radius: 10px; font-size: 18px; }
  .error-page { min-height: 0; }
  .error-copy { padding: 25px 8px 10px; }
  .error-copy h1 { font-size: clamp(52px,15vw,66px); }
  .error-visual { min-height: 0; aspect-ratio: 3/2; border-radius: 24px; }
  .wide-panel { padding: 18px; border-radius: 23px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .notification-item { grid-template-columns: 40px 1fr; }
  .notification-item img { width: 40px; height: 40px; }
  .notification-item time { grid-column: 2; }
  .chat-shell { min-height: calc(100vh - 96px); grid-template-columns: 1fr; border-radius: 23px; }
  .chat-sidebar { display: none; }
  .chat-main { min-height: calc(100vh - 98px); }
  .chat-messages { max-height: none; }
  .chat-compose { grid-template-columns: auto 1fr; }
  .send-button { grid-column: 1/-1; }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { position: relative; top: 0; display: flex; overflow-x: auto; }
  .legal-nav b { display: none; }
  .legal-nav a { flex: 0 0 auto; }
  .legal-article { min-width: 0; padding: 28px 18px; border-radius: 23px; }
  .legal-article h1 { font-size: clamp(34px,11.5vw,48px); }
}
