/* ============================================================================
   submit-os.css: /submit/ in the homepage's look (owner 2026-09-28, approved
   mockup submit-mockup.html). Loaded by Theme\SubmitOs only; every rule is
   under body.cg-submit-os / .cg-sub, which only cryptogames.gg carries
   (egamers.io keeps the old form, owner's order).
   Palette: home-os.css. Dark by default, light where the theme's switch says
   so (body[data-theme] is not "dark"), same as profile-os.css. No orange.
   ============================================================================ */

/* ---------------------------------------------------------------- tokens */
body.cg-submit-os {
  --sb-bg: #191919; --sb-s1: #212121; --sb-s2: #2a2a2a; --sb-s3: #333333; --sb-s4: #3f3f3f;
  --sb-line: rgba(255, 255, 255, .08); --sb-text: #ffffff; --sb-muted: #b5b5b5; --sb-dim: #8a8a8a;
  --sb-accent: #9d8cff; --sb-soft: rgba(106, 80, 255, .16); --sb-on-soft: #e6e0ff;
  --sb-grad: linear-gradient(135deg, #06707f 0%, #4a28c4 62%, #7b2fc0 100%);
  --sb-glow: rgba(123, 47, 192, .35);
  --sb-up: #35b477; --sb-warn: #e0b44a; --sb-down: #d65a52; --sb-err: #ff8a82;
  --sb-stripe-a: #2c2c2c; --sb-stripe-b: #262626;
  /* the picker (suggest-os.css) reads these */
  --sg-bg: var(--sb-s2); --sg-s1: var(--sb-s1); --sg-s2: var(--sb-s3); --sg-s3: var(--sb-s4);
  --sg-line: var(--sb-s4); --sg-text: var(--sb-text); --sg-muted: var(--sb-muted);
  --sg-accent: var(--sb-accent); --sg-soft: var(--sb-soft); --sg-err: var(--sb-err);
  --sg-grad: var(--sb-grad); --sg-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
body:not([data-theme="dark"]).cg-submit-os {
  --sb-bg: #ffffff; --sb-s1: #f4f4f6; --sb-s2: #ffffff; --sb-s3: #e9e9ee; --sb-s4: #dedee6;
  --sb-line: rgba(0, 0, 0, .08); --sb-text: #191919; --sb-muted: #6b6b6b; --sb-dim: #8a8a8a;
  --sb-accent: #4a28c4; --sb-soft: rgba(74, 40, 196, .10); --sb-on-soft: #ffffff;
  --sb-glow: rgba(123, 47, 192, .16);
  --sb-up: #2f9e68; --sb-warn: #a8761a; --sb-down: #c0453e; --sb-err: #c0453e;
  --sb-stripe-a: #f0f0f4; --sb-stripe-b: #e9e9ee;
  --sg-shadow: 0 20px 50px rgba(20, 20, 40, .18);
}

/* ---------------------------------------------------------- page ground */
body.cg-submit-os,
body.cg-submit-os main.cg-main,
body.cg-submit-os .cg-content-area { background: var(--sb-bg); }
body.cg-submit-os .cg-content-area.cg-sub {
  max-width: 1180px; margin: 0 auto; padding: 16px 24px 48px; color: var(--sb-text);
  font: 400 14px/1.5 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; box-sizing: border-box;
}
.cg-sub *, .cg-sub *::before, .cg-sub *::after { box-sizing: border-box; }
.cg-sub [hidden] { display: none !important; }
.cg-sub h1, .cg-sub h2, .cg-sub h3 { font-family: Inter, system-ui, sans-serif; color: var(--sb-text); }
.cg-sub a { color: inherit; text-decoration: none; }
.cg-sub button { font-family: inherit; }

/* ------------------------------------------------------------------ hero */
.cg-sub .sb-hero { position: relative; overflow: hidden; background: var(--sb-s1); border-radius: 18px; padding: 22px 24px; }
.cg-sub .sb-hero::before { content: ""; position: absolute; inset: -40% 40% auto -10%; height: 260px; pointer-events: none;
  background: radial-gradient(closest-side, var(--sb-glow), transparent); }
.cg-sub .sb-hero h1 { position: relative; margin: 0 0 4px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.cg-sub .sb-hero p { position: relative; margin: 0; color: var(--sb-muted); max-width: 60ch; }
.cg-sub .sb-types { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cg-sub .sb-chip { border: 0; background: var(--sb-s3); color: var(--sb-text); font: 600 13px/1.2 Inter, sans-serif; padding: 9px 14px; border-radius: 12px; cursor: pointer; }
.cg-sub .sb-chip:hover { background: var(--sb-s4); }
.cg-sub .sb-chip.is-on { background: var(--sb-grad); color: #fff; }
.cg-sub .sb-chip small { color: var(--sb-muted); font-weight: 500; font-size: 12px; margin-left: 4px; }
.cg-sub .sb-chip.is-on small { color: #e6e0ff; }

/* ---------------------------------------------------------------- layout */
.cg-sub .sb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; margin-top: 18px; align-items: start; }
.cg-sub .sb-col, .cg-sub .sb-aside { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.cg-sub #cg-sub-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.cg-sub .sb-flow { display: flex; flex-direction: column; gap: 14px; }
.cg-sub .sb-aside { position: sticky; top: calc(var(--cg-hd, 64px) + 16px); }

.cg-sub .sb-panel { position: relative; background: var(--sb-s1); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.cg-sub .sb-ph { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cg-sub .sb-ph h2 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; }
.cg-sub .sb-n { width: 26px; height: 26px; border-radius: 8px; background: var(--sb-soft); color: var(--sb-accent); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.cg-sub .sb-r { margin-left: auto; color: var(--sb-dim); font-size: 12px; }

/* ---------------------------------------------------------------- fields */
.cg-sub .sb-l { display: block; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--sb-muted); margin-bottom: 6px; }
.cg-sub .sb-req { color: var(--sb-accent); }
.cg-sub .sb-where { font-size: 11.5px; font-weight: 400; color: var(--sb-dim); letter-spacing: 0; margin: 0; }
.cg-sub .sb-spec { font-size: 12px; color: var(--sb-muted); margin: 0; }
.cg-sub .sb-spec b, .cg-sub .sb-strong { color: var(--sb-text); font-variant-numeric: tabular-nums; }
.cg-sub .sb-in {
  width: 100%; background: var(--sb-s2); border: 1px solid var(--sb-s4); border-radius: 12px; color: var(--sb-text);
  -webkit-text-fill-color: var(--sb-text); font: 14px/1.4 Inter, sans-serif; padding: 10px 12px; margin: 0; box-shadow: none; height: auto; min-height: 42px;
}
body:not([data-theme="dark"]).cg-submit-os .cg-sub .sb-in { color-scheme: light; }
body[data-theme="dark"].cg-submit-os .cg-sub .sb-in { color-scheme: dark; }
.cg-sub textarea.sb-in { resize: vertical; min-height: 84px; }
.cg-sub .sb-in::placeholder { color: var(--sb-muted); opacity: .6; -webkit-text-fill-color: var(--sb-muted); }
.cg-sub .sb-in:focus { outline: 2px solid var(--sb-accent); outline-offset: 1px; border-color: var(--sb-s4); }
.cg-sub .sb-mt { margin-top: 8px; }
.cg-sub .sb-err { font-size: 12px; color: var(--sb-err); margin-top: 4px; }
.cg-sub .sb-err:empty { display: none; }
.cg-sub .sb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cg-sub .sb-two .sb-span { grid-column: 1 / -1; }
.cg-sub .sb-stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cg-sub .sb-link { border: 0; background: none; padding: 0; margin-top: 6px; color: var(--sb-accent); font: 600 12px/1.3 Inter, sans-serif; cursor: pointer; }
.cg-sub .sb-inline { color: var(--sb-accent); font-weight: 600; }
.cg-sub .sb-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.cg-sub .sb-check input { width: 16px; height: 16px; accent-color: var(--sb-accent); margin: 0; }

/* ------------------------------------------------------------ term chips */
.cg-sub .sb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cg-sub .sb-tg { position: relative; display: inline-flex; align-items: center; background: var(--sb-s3); color: var(--sb-text); border: 0; border-radius: 10px;
  padding: 6px 10px; font: 600 12.5px/1.2 Inter, sans-serif; cursor: pointer; user-select: none; }
.cg-sub .sb-tg:hover { background: var(--sb-s4); }
.cg-sub .sb-tg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.cg-sub .sb-tg:has(input:checked), .cg-sub .sb-tg.is-on { background: var(--sb-soft); color: var(--sb-accent); outline: 1px solid color-mix(in srgb, var(--sb-accent) 45%, transparent); }
.cg-sub .sb-tg:has(input:focus-visible) { outline: 2px solid var(--sb-accent); }
.cg-sub .sb-tg.sb-more { display: none; }
.cg-sub .sb-chips.is-open .sb-tg.sb-more { display: inline-flex; }
.cg-sub .sb-tg-more { color: var(--sb-muted); }

/* --------------------------------------------------------------- pickers */
.cg-sub .cg-pick { border-radius: 12px; border-color: var(--sb-s4); }
.cg-sub .cg-pick .cg-pick-q { flex: 1 1 160px; min-width: 120px; border: 0; background: none; box-shadow: none; outline: none; padding: 5px 6px;
  color: var(--sb-text); -webkit-text-fill-color: var(--sb-text); font: 14px/1.4 Inter, sans-serif; height: auto; margin: 0; }
.cg-sub .cg-pick .cg-pick-q::placeholder { color: var(--sb-muted); opacity: .6; -webkit-text-fill-color: var(--sb-muted); }

/* ------------------------------------------------------------- the search */
.cg-sub .sb-drop { margin-top: 6px; background: var(--sb-s2); border: 1px solid var(--sb-s4); border-radius: 14px; overflow: hidden; }
.cg-sub .sb-g { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--sb-dim); padding: 8px 12px 4px; }
.cg-sub .sb-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; width: 100%; text-align: left; background: none; border: 0; color: var(--sb-text); cursor: pointer; }
.cg-sub .sb-drop .sb-row + .sb-row { border-top: 1px solid var(--sb-line); }
.cg-sub .sb-drop .sb-row:hover { background: var(--sb-s3); }
.cg-sub .sb-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--sb-s4); color: var(--sb-text); flex: none; display: grid; place-items: center;
  font-weight: 800; font-size: 12px; object-fit: cover; }
.cg-sub .sb-row-t { min-width: 0; flex: 1 1 auto; }
.cg-sub .sb-t { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-sub .sb-m { color: var(--sb-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-sub .sb-a { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--sb-accent); white-space: nowrap; flex: none; }
.cg-sub .sb-row.sb-new { background: var(--sb-soft); }
.cg-sub .sb-row.sb-new .sb-ic { background: var(--sb-grad); color: #fff; }

/* ---------------------------------------------------------------- images */
.cg-sub .sb-slots { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: start; }
.cg-sub .sb-slot { position: relative; border: 1.5px dashed var(--sb-s4); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--sb-s2); min-width: 0; }
.cg-sub .sb-box { border: 0; border-radius: 12px; cursor: pointer; padding: 6px; color: var(--sb-dim); font: 600 12px/1.3 Inter, sans-serif; text-align: center;
  background: repeating-linear-gradient(45deg, var(--sb-stripe-a) 0 8px, var(--sb-stripe-b) 8px 16px); display: grid; place-items: center;
  background-size: cover; background-position: center; width: 100%; }
.cg-sub .sb-box:hover { color: var(--sb-text); }
.cg-sub .sb-box:focus-visible { outline: 2px solid var(--sb-accent); outline-offset: 2px; }
.cg-sub .sb-box.is-filled { background-color: var(--sb-s3); background-repeat: no-repeat; background-size: cover; }
.cg-sub .sb-sq { width: 120px; height: 120px; border-radius: 24px; margin-inline: auto; }
.cg-sub .sb-sq--sm { width: 76px; height: 76px; border-radius: 18px; }
.cg-sub .sb-wide { aspect-ratio: 16 / 9; }
.cg-sub .sb-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, .6); color: #fff; font: 700 16px/1 Inter, sans-serif; display: grid; place-items: center; padding: 0; }
.cg-sub .sb-x:hover { background: rgba(0, 0, 0, .85); }
.cg-sub .sb-gal { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.cg-sub .sb-cell { position: relative; min-width: 0; }
.cg-sub .sb-gal .sb-box { aspect-ratio: 16 / 9; border-radius: 9px; font-size: 18px; padding: 0; }
.cg-sub .sb-gal .sb-x { top: 3px; right: 3px; width: 22px; height: 22px; font-size: 14px; }
.cg-sub .sb-vids { display: flex; flex-direction: column; gap: 8px; }
.cg-sub .sb-vr { display: flex; gap: 8px; align-items: center; }
.cg-sub .sb-vr span { font-size: 12px; color: var(--sb-dim); width: 64px; flex: none; }
.cg-sub .sb-vids .sb-link { align-self: flex-start; margin-top: 0; }

/* ------------------------------------------------------------ send + done */
.cg-sub .sb-self { align-self: center; }
.cg-sub .sb-alert { border-radius: 12px; padding: 12px 14px; font-size: 13px; background: color-mix(in srgb, var(--sb-down) 14%, transparent); color: var(--sb-text); }
.cg-sub .sb-alert strong { color: var(--sb-err); }
.cg-sub .sb-foot { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.cg-sub .sb-foot .sb-spec { margin-right: auto; }
.cg-sub .sb-foot--left { justify-content: flex-start; }
.cg-sub .sb-btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 12px; padding: 12px 18px;
  font: 700 14px/1.2 Inter, sans-serif; color: #fff; background: var(--sb-grad); cursor: pointer; text-decoration: none; }
.cg-sub .sb-btn:hover { filter: brightness(1.08); color: #fff; }
.cg-sub .sb-btn:disabled { opacity: .7; cursor: progress; }
.cg-sub .sb-btn--ghost { background: var(--sb-s3); color: var(--sb-text); }
.cg-sub .sb-btn--ghost:hover { background: var(--sb-s4); color: var(--sb-text); filter: none; }
.cg-sub .sb-btn--block { width: 100%; }
.cg-sub .sb-done h2 { margin: 0; font-size: 20px; font-weight: 800; }
.cg-sub .sb-done p { margin: 0; color: var(--sb-muted); }

/* --------------------------------------------------------------- sidebar */
.cg-sub .sb-side h3 { margin: 0; font-size: 14px; font-weight: 700; }
.cg-sub .sb-side p { margin: 0; color: var(--sb-muted); font-size: 12.5px; }
.cg-sub .sb-who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.cg-sub .sb-av { width: 38px; height: 38px; border-radius: 50%; background: var(--sb-grad); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; object-fit: cover; }
.cg-sub .sb-mine { display: flex; flex-direction: column; }
.cg-sub .sb-mine h3 { margin-bottom: 4px; }
.cg-sub .sb-mine .sb-row { padding: 8px 0; cursor: default; }
.cg-sub .sb-mine .sb-row + .sb-row { border-top: 1px solid var(--sb-line); }
.cg-sub .sb-mine a.sb-t:hover { color: var(--sb-accent); }
.cg-sub .sb-pill { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; flex: none; margin-left: auto; }
.cg-sub .sb-p-live { background: color-mix(in srgb, var(--sb-up) 16%, transparent); color: var(--sb-up); }
.cg-sub .sb-p-wait { background: color-mix(in srgb, var(--sb-warn) 16%, transparent); color: var(--sb-warn); }
.cg-sub .sb-p-no { background: color-mix(in srgb, var(--sb-down) 16%, transparent); color: var(--sb-down); }
.cg-sub .sb-more-link { color: var(--sb-accent); font-size: 12.5px; font-weight: 600; }
.cg-sub .sb-gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; background: #ffffff; color: #1f1f1f; border: 1px solid #dadce0;
  border-radius: 12px; padding: 10px; font-weight: 600; }
.cg-sub .sb-gbtn:hover { background: #f6f6f6; color: #1f1f1f; }
.cg-sub .sb-gbtn i { width: 18px; height: 18px; border-radius: 50%; display: block;
  background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); }

/* ----------------------------------------------------------------- sizes */
@media (max-width: 900px) {
  .cg-sub .sb-grid { grid-template-columns: 1fr; }
  .cg-sub .sb-aside { position: static; }
}
@media (max-width: 600px) {
  body.cg-submit-os .cg-content-area.cg-sub { padding: 12px 16px 40px; }
  .cg-sub .sb-hero { padding: 18px 16px; }
  .cg-sub .sb-hero h1 { font-size: 22px; }
  .cg-sub .sb-panel { padding: 16px; }
  .cg-sub .sb-two, .cg-sub .sb-slots { grid-template-columns: 1fr; }
  .cg-sub .sb-gal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cg-sub .sb-r { margin-left: 0; width: 100%; }
  .cg-sub .sb-a { display: none; }
}
