:root {
  --custom-red: #ff3158;
  --custom-green: #43e6a0;
  --custom-dark: #050a0e;
  --custom-panel: #0a1218;
  --custom-light: #edf2f4;
  --custom-ink: #071016;
  --custom-muted: #687b84;
  --custom-line: rgba(128, 159, 172, .24);
}

[hidden] { display: none !important; }

.customs-page { background: var(--custom-dark); }
.customs-page.customs-auth-pending .customs-member-app,
.customs-page.customs-auth-pending .customs-guest-gate { visibility: hidden; }

.customs-hero {
  position: relative;
  min-height: clamp(430px, 56svh, 560px);
  overflow: hidden;
  border-bottom: 1px solid rgba(139, 171, 184, .17);
  color: #f4f8f9;
  background: #050a0e;
}

.customs-hero-image {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 8, 11, .98) 0%, rgba(3, 8, 11, .88) 42%, rgba(3, 8, 11, .28) 76%, rgba(3, 8, 11, .78) 100%),
    linear-gradient(0deg, rgba(3, 8, 11, .98), transparent 54%),
    url("images/tacticool-squad.jpg") 62% 43% / cover no-repeat;
  filter: saturate(.82) contrast(1.08);
}

.customs-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 94px, rgba(255,255,255,.018) 95px 96px);
  mask-image: linear-gradient(to right, #000, transparent 82%);
}

.customs-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: clamp(42px, 6vw, 100px);
  align-items: center;
  min-height: inherit;
  padding-block: clamp(58px, 7vw, 88px);
}

.customs-hero-copy { max-width: 780px; }
.customs-hero-copy h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  color: #f3f7f8;
  font: 900 clamp(3.2rem, 6.1vw, 6rem)/.83 "Barlow Condensed", Arial, sans-serif;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.customs-hero-copy h1 em { color: var(--custom-red); font-style: normal; }
.customs-hero-copy > p:not(.op-kicker) {
  max-width: 650px;
  margin: 0;
  color: #b5c1c6;
  font: 500 clamp(.98rem, 1.2vw, 1.12rem)/1.65 Inter, Arial, sans-serif;
}
.customs-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.customs-hero-flow {
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--custom-red);
  border-bottom: 1px solid rgba(159, 192, 205, .18);
  list-style: none;
  background: rgba(5, 12, 16, .86);
  backdrop-filter: blur(12px);
}
.customs-hero-flow li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 88px;
  padding: 17px 18px;
  border-bottom: 1px solid rgba(159, 192, 205, .15);
}
.customs-hero-flow li:last-child { border-bottom: 0; }
.customs-hero-flow b { color: var(--custom-red); font: 850 .72rem/1 Inter, sans-serif; letter-spacing: .12em; }
.customs-hero-flow span { min-width: 0; }
.customs-hero-flow strong { display: block; color: #f5f8f9; font: 850 1.08rem/1 "Barlow Condensed", sans-serif; letter-spacing: .035em; text-transform: uppercase; }
.customs-hero-flow small { display: block; margin-top: 7px; color: #91a2a9; font: 500 .76rem/1.45 Inter, sans-serif; }

.customs-guest-gate {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  margin-block: clamp(36px, 6vw, 76px);
  padding-block: clamp(30px, 4vw, 50px);
  border-block: 1px solid #b9c5ca;
  color: var(--custom-ink);
  background: var(--custom-light);
}
.customs-guest-mark {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border: 1px solid #c5cfd3;
  color: var(--custom-red);
  font: 900 2.2rem/1 "Barlow Condensed", sans-serif;
}
.customs-guest-gate h2 { margin: 8px 0 6px; font: 900 clamp(2rem, 4vw, 3.7rem)/.92 "Barlow Condensed", sans-serif; letter-spacing: -.02em; }
.customs-guest-gate p:not(.op-kicker) { margin: 0; color: #596b73; }
.customs-guest-actions { display: flex; gap: 8px; }

.customs-board { color: var(--custom-ink); background: var(--custom-light); }
.customs-board-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
  padding-block: clamp(54px, 7vw, 92px);
}
.customs-section-head {
  display: flex;
  gap: 30px;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid #bdc8cd;
}
.customs-section-head h2 { margin: 12px 0 0; font: 900 clamp(2.7rem, 5vw, 5.2rem)/.82 "Barlow Condensed", sans-serif; letter-spacing: -.035em; }
.customs-section-head h2 em { color: var(--custom-red); font-style: normal; }
.customs-board-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-end; }
.customs-board-actions > span { color: #64767e; font: 750 .69rem/1 Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; }

.customs-open-list { display: grid; margin-top: 4px; }
.customs-request {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 108px;
  padding: 18px 4px;
  border-bottom: 1px solid #c9d2d6;
}
.customs-request-avatar,
.customs-person-avatar {
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px solid #b8c4c9;
  border-radius: 50%;
  color: #fff;
  background: #111c22;
  font: 850 1rem/1 Inter, sans-serif;
}
.customs-request-avatar { width: 54px; height: 54px; }
.customs-request-avatar img,
.customs-person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.customs-request-copy { min-width: 0; }
.customs-request-copy > span { color: var(--custom-red); font: 850 .62rem/1 Inter, sans-serif; letter-spacing: .11em; text-transform: uppercase; }
.customs-request-copy h3 { margin: 6px 0 5px; font: 900 1.55rem/1 "Barlow Condensed", sans-serif; letter-spacing: .015em; text-transform: uppercase; }
.customs-request-copy h3 a { color: var(--custom-ink); text-decoration: none; }
.customs-request-copy h3 a:hover,
.customs-request-copy h3 a:focus-visible { color: var(--custom-red); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.customs-request-copy p { margin: 0; color: #667981; font-size: .78rem; }
.customs-request .ctv-action { min-width: 170px; }

.customs-empty {
  display: grid;
  justify-items: start;
  min-height: 300px;
  align-content: center;
  padding: 36px 4px;
  border-bottom: 1px solid #bdc8cd;
}
.customs-empty > span { color: var(--custom-red); font: 900 2rem/1 Inter, sans-serif; }
.customs-empty strong { margin-top: 15px; font: 900 1.9rem/1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.customs-empty p { margin: 9px 0 20px; color: #61737b; }

.customs-own {
  position: sticky;
  top: calc(var(--nav-h, 78px) + 24px);
  overflow: hidden;
  border-top: 3px solid var(--custom-red);
  color: #edf4f6;
  background: #081116;
}
.customs-own > header { padding: 24px 24px 19px; border-bottom: 1px solid rgba(159, 192, 205, .17); }
.customs-own > header span { color: #82949c; font: 800 .63rem/1 Inter, sans-serif; letter-spacing: .11em; text-transform: uppercase; }
.customs-own > header h2 { margin: 8px 0 0; font: 900 2rem/1 "Barlow Condensed", sans-serif; }
.customs-own > .ctv-action { width: calc(100% - 48px); margin: 0 24px 24px; }
.customs-own-empty { padding: 25px 24px; }
.customs-own-empty strong { font: 850 1.25rem/1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.customs-own-empty p { margin: 8px 0 0; color: #85979e; font-size: .78rem; line-height: 1.5; }
.customs-own-card { padding: 24px; }
.customs-own-card > span { color: var(--custom-green); font: 850 .63rem/1 Inter, sans-serif; letter-spacing: .11em; text-transform: uppercase; }
.customs-own-card h3 { margin: 10px 0 8px; font: 900 1.8rem/1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.customs-own-card p { margin: 0 0 18px; color: #8ea0a7; font-size: .79rem; line-height: 1.55; }
.customs-own-people { display: flex; align-items: center; margin-bottom: 18px; }
.customs-person-avatar { width: 42px; height: 42px; margin-right: -8px; border-color: #35464e; }
.customs-own-actions { display: grid; gap: 8px; }
.customs-own-actions .ctv-action { width: 100%; }

.customs-chat,
.customs-confirm {
  width: min(calc(100% - 28px), 920px);
  max-width: none;
  max-height: min(88dvh, 860px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #263943;
  border-radius: 0;
  color: #edf4f6;
  background: #071016;
  box-shadow: 0 34px 100px rgba(0,0,0,.7);
}
.customs-chat::backdrop,
.customs-confirm::backdrop { background: rgba(0, 5, 8, .84); backdrop-filter: blur(5px); }
.customs-chat-panel { display: grid; grid-template-rows: auto auto minmax(190px, 1fr) auto; height: min(82dvh, 780px); }
.customs-chat-head { display: flex; gap: 22px; align-items: start; justify-content: space-between; padding: 22px 24px; border-top: 3px solid var(--custom-red); border-bottom: 1px solid rgba(159, 192, 205, .16); }
.customs-chat-head span { color: #82949c; font: 800 .62rem/1 Inter, sans-serif; letter-spacing: .11em; text-transform: uppercase; }
.customs-chat-head h2 { margin: 7px 0 4px; font: 900 2rem/1 "Barlow Condensed", sans-serif; }
.customs-chat-head p { margin: 0; color: #9babb1; font-size: .77rem; }
.customs-dialog-close { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border: 1px solid #30434c; color: #fff; background: transparent; font-size: 1.5rem; cursor: pointer; }
.customs-dialog-close:hover,
.customs-dialog-close:focus-visible { border-color: var(--custom-red); color: var(--custom-red); }
.customs-chat-status { display: flex; gap: 20px; align-items: center; justify-content: space-between; min-height: 52px; padding: 9px 24px; border-bottom: 1px solid rgba(159, 192, 205, .14); background: #09151b; }
.customs-chat-status span { color: #a7b6bc; font: 750 .66rem/1 Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.customs-chat-status i { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--custom-green); box-shadow: 0 0 12px rgba(67,230,160,.8); }
.customs-chat-status button { min-height: 38px; border: 0; color: #ff8198; background: transparent; font: 800 .66rem/1 Inter, sans-serif; letter-spacing: .07em; text-transform: uppercase; cursor: pointer; }
.customs-chat-status button:hover,
.customs-chat-status button:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.customs-messages { overflow-y: auto; padding: 24px; overscroll-behavior: contain; background: linear-gradient(135deg, rgba(255,49,88,.025), transparent 46%); }
.customs-message { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; max-width: 78%; margin-bottom: 18px; }
.customs-message.is-own { margin-left: auto; grid-template-columns: minmax(0, 1fr) 36px; }
.customs-message.is-own .customs-message-avatar { grid-column: 2; }
.customs-message.is-own .customs-message-body { grid-column: 1; grid-row: 1; }
.customs-message-avatar { display: grid; width: 34px; height: 34px; overflow: hidden; place-items: center; border-radius: 50%; color: #fff; background: #1a2a32; font-size: .7rem; font-weight: 800; }
.customs-message-avatar img { width: 100%; height: 100%; object-fit: cover; }
.customs-message-body { min-width: 0; padding: 11px 13px; border: 1px solid #263943; background: #0d1a20; }
.customs-message.is-own .customs-message-body { border-color: rgba(255,49,88,.36); background: rgba(255,49,88,.1); }
.customs-message-meta { display: flex; gap: 12px; justify-content: space-between; color: #80939b; font-size: .62rem; }
.customs-message-meta strong { overflow: hidden; color: #dfe8eb; text-overflow: ellipsis; white-space: nowrap; }
.customs-message-body p { margin: 7px 0 0; overflow-wrap: anywhere; color: #c6d2d6; font-size: .84rem; line-height: 1.55; white-space: pre-wrap; }
.customs-system-message { margin: 8px auto 20px; padding: 8px 14px; color: #82949c; font: 700 .65rem/1.45 Inter, sans-serif; text-align: center; }
.customs-message-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; padding: 16px 18px; border-top: 1px solid rgba(159, 192, 205, .17); background: #081116; }
.customs-message-form label { display: block; }
.customs-message-form textarea { display: block; width: 100%; min-height: 54px; max-height: 150px; resize: vertical; border: 1px solid #31434c; border-radius: 0; outline: 0; color: #f3f7f8; background: #050b0f; font: 500 .88rem/1.5 Inter, sans-serif; padding: 13px; }
.customs-message-form textarea:focus { border-color: var(--custom-red); box-shadow: 0 0 0 2px rgba(255,49,88,.18); }
.customs-message-form > div { display: grid; gap: 5px; justify-items: end; }
.customs-message-form > div > span { color: #778a92; font-size: .58rem; }

.customs-confirm { width: min(calc(100% - 28px), 520px); }
.customs-confirm-panel { padding: 30px; border-top: 3px solid var(--custom-red); }
.customs-confirm-mark { color: var(--custom-red); font: 900 2rem/1 Inter, sans-serif; }
.customs-confirm-panel > p:first-of-type { margin: 17px 0 8px; color: #899aa1; font: 800 .62rem/1 Inter, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.customs-confirm-panel h2 { margin: 0; font: 900 2.5rem/1 "Barlow Condensed", sans-serif; }
.customs-confirm-panel > p:last-of-type { margin: 14px 0 24px; color: #aab8bd; line-height: 1.6; }
.customs-confirm-panel > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.customs-toast { position: fixed; z-index: 2300; right: 22px; bottom: 22px; max-width: min(380px, calc(100% - 28px)); padding: 14px 18px; border-left: 3px solid var(--custom-green); color: #edf5f6; background: #0b171d; box-shadow: 0 18px 60px rgba(0,0,0,.4); font: 700 .78rem/1.45 Inter, sans-serif; }
.customs-toast.is-error { border-left-color: var(--custom-red); }

.customs-page :is(button, a, textarea):focus-visible { outline: 3px solid #70dfff; outline-offset: 3px; }

@media (max-width: 980px) {
  .customs-hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .customs-hero-flow { display: grid; grid-template-columns: repeat(3, 1fr); }
  .customs-hero-flow li { grid-template-columns: 1fr; align-content: start; min-height: 150px; border-right: 1px solid rgba(159,192,205,.15); border-bottom: 0; }
  .customs-board-shell { grid-template-columns: 1fr; }
  .customs-own { position: static; display: grid; grid-template-columns: minmax(220px, .5fr) minmax(0, 1fr); }
  .customs-own > header { border-right: 1px solid rgba(159,192,205,.17); }
  .customs-own > .ctv-action { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .customs-hero { min-height: auto; }
  .customs-hero-image { background-position: 68% 45%; }
  .customs-hero-grid { padding-block: 52px; }
  .customs-hero-copy h1 { font-size: clamp(3rem, 15vw, 4.7rem); }
  .customs-hero-actions .ctv-action { width: 100%; }
  .customs-hero-flow { grid-template-columns: 1fr; }
  .customs-hero-flow li { grid-template-columns: 42px minmax(0,1fr); min-height: 82px; border-right: 0; border-bottom: 1px solid rgba(159,192,205,.15); }
  .customs-guest-gate { grid-template-columns: 52px minmax(0,1fr); gap: 18px; }
  .customs-guest-mark { width: 50px; height: 50px; }
  .customs-guest-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .customs-section-head { display: grid; align-items: start; }
  .customs-board-actions { justify-content: space-between; }
  .customs-request { grid-template-columns: 48px minmax(0,1fr); }
  .customs-request-avatar { width: 46px; height: 46px; }
  .customs-request .ctv-action { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .customs-own { display: block; }
  .customs-own > header { border-right: 0; }
  .customs-chat { width: 100%; height: 100dvh; max-height: 100dvh; border: 0; }
  .customs-chat-panel { height: 100dvh; }
  .customs-message { max-width: 92%; }
  .customs-message-form { grid-template-columns: 1fr; }
  .customs-message-form > div { grid-template-columns: 1fr auto; align-items: center; }
}

@media (max-width: 430px) {
  .customs-hero-copy h1 { font-size: clamp(2.8rem, 16vw, 4rem); }
  .customs-guest-actions,
  .customs-confirm-panel > div { grid-template-columns: 1fr; }
  .customs-section-head h2 { font-size: 2.7rem; }
  .customs-chat-head,
  .customs-messages { padding-inline: 16px; }
  .customs-chat-status { padding-inline: 16px; }
}

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