/* ------------------------------------------------------------------
   Sayyid Tarik bin Taimur Cultural Complex — logo vote
   Built from "Tone of Voice and Visual Guidelines", Version 1, October 2026.
   Colour, type roles, card ladder, layout and RTL rules follow that guide.
   ------------------------------------------------------------------ */

/* Open-licence stand-ins named in the guide (El Messiri, IBM Plex Sans Arabic, Open Sans, Amiri).
   To use the licensed fonts (Oman Typeface, PNU, Segoe UI Variable, Thmanyah Serif Text), add their
   @font-face rules with the same family names listed first in the --f-* stacks below. */
@font-face { font-family: "El Messiri"; font-weight: 700; font-display: swap; src: url(fonts/el-messiri-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+25CC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+25CC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: swap; src: url(fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+25CC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-arabic-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: swap; src: url(fonts/ibm-plex-sans-arabic-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Open Sans"; font-weight: 300; font-display: swap; src: url(fonts/open-sans-latin-300-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Open Sans"; font-weight: 400; font-display: swap; src: url(fonts/open-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Open Sans"; font-weight: 600; font-display: swap; src: url(fonts/open-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Amiri"; font-weight: 400; font-display: swap; src: url(fonts/amiri-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+25CC; }
@font-face { font-family: "Amiri"; font-weight: 400; font-display: swap; src: url(fonts/amiri-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  /* Colour (guide, page 24) */
  --plum: #591A4F;      /* Deep Plum: gradient start, top left */
  --indigo: #1D1D4F;    /* Midnight Indigo: gradient end, bottom right */
  --white: #FFFFFF;     /* titles and body */
  --mist: #F1EFEF;      /* English title line */
  --lilac: #DFD4E4;     /* labels, secondary text */
  --mauve: #BAADB1;     /* details and footers */
  --c-head: #7B3252;    /* card ladder, overridden per step */
  --c-body: #5E2142;
  --ink: #1D1D4F;
  --alert: #FFC4BF;

  /* Type roles (guide, page 25): specified font first, open-licence stand-in second */
  --f-title: "Oman Typeface", "El Messiri", "Noto Kufi Arabic", Tahoma, sans-serif;
  --f-ar: "PNU", "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, sans-serif;
  --f-en: "Segoe UI Variable", "Segoe UI", "Open Sans", system-ui, -apple-system, Arial, sans-serif;
  --f-statement: "Thmanyah Serif Text", "Amiri", "Traditional Arabic", serif;

  --gutter: 4.5vw;      /* side margins about 4.5% of the width */
}
* { box-sizing: border-box; }
html { background: var(--indigo); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; position: relative;
  color: var(--white); font-family: var(--f-en); font-size: 16px;
  background: linear-gradient(135deg, var(--plum) 0%, var(--indigo) 100%) fixed;
}
body.hero::before {                       /* photograph under the gradient (guide: section dividers) */
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(135deg, rgba(89,26,79,.86) 0%, rgba(29,29,79,.80) 100%), url(brand/hero.jpg) center / cover no-repeat;
}
body > * { position: relative; z-index: 1; }
a { color: var(--lilac); text-underline-offset: 3px; }
a:hover { color: var(--white); }
:focus-visible { outline: 3px solid var(--lilac); outline-offset: 3px; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }

/* pixel motif: left edge only, never behind text */
.pixels { position: fixed; z-index: 0 !important; top: 0; bottom: 0; left: 1.5vw; width: 40px; pointer-events: none; opacity: .14;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='69'%3E%3Crect x='0' y='0' width='14' height='14' fill='white'/%3E%3Crect x='22' y='24' width='14' height='14' fill='white'/%3E%3C/svg%3E") repeat-y; }
@media (max-width: 899px) { .pixels { display: none; } }

/* ---- one language at a time: Arabic by default, English on request; the other is hidden ---- */
html[data-ui="ar"] .en, html[data-ui="en"] .ar { display: none !important; }
.ar { font-family: var(--f-ar); unicode-bidi: isolate; line-height: 1.75; font-size: 1.17rem; }
.en { font-family: var(--f-en); direction: ltr; unicode-bidi: isolate; line-height: 1.5; font-size: 1.04rem; }
.pair { display: block; }
.pair > .ar, .pair > .en { text-align: start; }
.pair > .en { color: var(--mist); }
.prose .ar { text-align: justify; text-justify: inter-word; }
.prose p { margin: 0 0 .9em; }
.details, .details .ar, .details .en { font-size: .92rem; color: var(--mauve); line-height: 1.6; }

/* ---- header: Arabic title top right with a lighter English line, Ministry logo top left ---- */
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem;
  padding: 1.6rem var(--gutter) 0; }
@media (min-width: 900px) { .top { padding-left: max(var(--gutter), 76px); } }
.top .ministry { display: block; width: clamp(150px, 16vw, 210px); height: auto; margin-top: .3rem; flex: none; }
.page-title { margin: 0; text-align: start; }
.page-title .ar { display: block; font-family: var(--f-title); font-weight: 700; font-size: clamp(1.9rem, 4.4vw, 2.67rem); line-height: 1.35; color: var(--white); }
.page-title .en { display: block; font-weight: 600; font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.3; color: var(--white); }
.top-nav { display: flex; gap: 1rem; align-items: center; margin-top: .6rem; flex-wrap: wrap; }
.top-nav form { margin: 0; }
.lang-toggle { display: inline-block; padding: .28rem .85rem; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; color: var(--white); text-decoration: none; font-size: .95rem; line-height: 1.4; }
.lang-toggle:hover { background: rgba(255,255,255,.14); color: var(--white); }
html[data-ui="ar"] .lang-toggle { font-family: var(--f-en); }
html[data-ui="en"] .lang-toggle { font-family: var(--f-ar); }

.shell { width: 100%; max-width: 1180px; margin: 0 auto; padding: 1.6rem var(--gutter) 2.5rem; flex: 1; }
@media (min-width: 900px) { .shell { padding-left: max(var(--gutter), 76px); } }
.shell.narrow { max-width: 760px; }
.shell > * + * { margin-top: 1.3rem; }

.foot { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem var(--gutter) 1.2rem; color: var(--mauve); font-size: .82rem; }
@media (min-width: 900px) { .foot { padding-left: max(var(--gutter), 76px); } }
.foot .ar { font-size: .95rem; line-height: 1.4; }
.foot .en { font-size: .82rem; }
.foot-step { font-weight: 400; font-family: var(--f-en); }

/* ---- cards: header over body (guide, page 24 and 28) ---- */
.card { background: var(--c-body); }
.card-h { background: var(--c-head); padding: .9rem 1.3rem 1rem; }
.card-h .num { font-size: .85rem; font-weight: 300; color: var(--lilac); text-align: end; line-height: 1.2; }
.card-h .ar { display: block; font-weight: 700; font-size: 1.5rem; line-height: 1.4; text-align: start; }
.card-h .en { display: block; text-align: start; font-weight: 700; font-size: 1.35rem; line-height: 1.4; color: var(--white); }
.card-b { padding: 1.3rem; }
.card-b.pair > .en, .card-b .pair > .en { color: var(--mist); }
.card-b + .card-b { border-top: 1px solid rgba(255,255,255,.12); }

/* ---- progress ---- */
.rail { display: flex; gap: 5px; }
.rail i { flex: 1; height: 4px; background: rgba(255,255,255,.18); }
.rail i.done { background: var(--lilac); }
.rail i.now { background: var(--white); }
.rail-label { display: flex; justify-content: space-between; color: var(--mauve); margin-top: .45rem; }
.rail-label .ar { font-size: .98rem; line-height: 1.4; }
.rail-label .en { font-size: .85rem; }

/* ---- forms ---- */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 2.4rem; }
.fields .wide { grid-column: 1 / -1; }
.field { display: block; }
.lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .35rem; }
.lbl .ar { font-weight: 700; font-size: 1.05rem; line-height: 1.5; }
.lbl .en { font-weight: 700; font-size: 1rem; line-height: 1.5; }
.hint { display: flex; justify-content: space-between; gap: 1rem; margin-top: .3rem; color: var(--mauve); font-size: .85rem; }
.hint .ar { font-size: .88rem; line-height: 1.5; } .hint .en { font-size: .8rem; }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], select, textarea {
  width: 100%; padding: .7rem .85rem; font: inherit; font-size: 1.05rem; color: var(--ink);
  background: var(--mist); border: 1px solid var(--mauve); border-radius: 2px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--white); box-shadow: 0 0 0 3px var(--lilac); }
input.ltr { direction: ltr; text-align: left; }
textarea { min-height: 120px; line-height: 1.6; }
.has-error input, .has-error select { border-color: #ff8f87; box-shadow: 0 0 0 2px rgba(255,143,135,.5); }
.err { display: flex; justify-content: space-between; gap: 1rem; color: var(--alert); font-weight: 600; margin-top: .35rem; }
.err .ar { font-size: .95rem; line-height: 1.5; } .err .en { font-size: .85rem; }
.alert { background: rgba(255,120,110,.14); border-inline-start: 4px solid #ff8f87; padding: .8rem 1.1rem; color: var(--white); }
.alert .err { margin: 0; color: var(--alert); }
.alert.ok { background: rgba(223,212,228,.12); border-color: var(--lilac); color: var(--white); }
.check { display: flex; gap: .8rem; align-items: flex-start; cursor: pointer; }
.check input { flex: none; width: 1.25rem; height: 1.25rem; margin-top: .45rem; accent-color: var(--lilac); }
.check .pair { flex: 1; }

/* ---- buttons: white on the gradient, arrows mirror in Arabic (Next points left) ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .9rem; min-height: 3rem; padding: .55rem 1.5rem;
  font: inherit; font-weight: 600; background: var(--white); color: var(--plum); border: 1px solid var(--white);
  border-radius: 2px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--lilac); border-color: var(--lilac); color: var(--plum); }
.btn .ar { font-weight: 700; font-size: 1.1rem; line-height: 1.4; }
.btn .en { font-size: 1.02rem; font-weight: 600; line-height: 1.4; }
.btn svg { width: 1.1rem; height: 1.1rem; flex: none; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn.ghost:hover { background: rgba(255,255,255,.12); border-color: var(--white); color: var(--white); }
.btn.small { min-height: 0; padding: .3rem .8rem; font-size: .85rem; }
.linkbtn { display: inline-flex; gap: .7rem; align-items: baseline; background: none; border: 0; padding: .2rem .1rem; font: inherit; color: var(--lilac); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.linkbtn:hover { color: var(--white); }
.linkbtn .ar { font-size: .95rem; line-height: 1.4; } .linkbtn .en { font-size: .85rem; }
.actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.5rem; }
html[dir="ltr"] .actions { flex-direction: row-reverse; }
html[dir="ltr"] .btn .chev { transform: scaleX(-1); }

/* ---- logo wall: logos sit on a white mat, caption card below ---- */
.wall { background: var(--white); padding: clamp(1rem, 4vw, 2.6rem); display: grid; place-items: center; box-shadow: inset 0 0 0 10px var(--mist); }
.wall { position: relative; }
.wall img { display: block; width: min(100%, 760px); max-height: 70vh; object-fit: contain; height: auto; }
.fs-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem; background: var(--plum); color: var(--white); border: 0; border-radius: 2px; font: inherit; font-size: .92rem; cursor: pointer; }
.fs-btn:hover { background: var(--indigo); }
.fs-btn svg { width: 1rem; height: 1rem; flex: none; }
.fs-btn .ar, .fs-btn .en { font-size: .92rem; line-height: 1.4; font-weight: 600; }
.wall .fs-btn { position: absolute; inset-block-end: .9rem; inset-inline-end: .9rem; }
.role-img { position: relative; background: var(--white); padding: .8rem; margin-bottom: 1.1rem; display: grid; place-items: center; }
.role-img img { display: block; max-width: 100%; max-height: 38vh; object-fit: contain; }
.role-img .fs-btn { position: absolute; inset-block-end: .5rem; inset-inline-end: .5rem; }
.opt { font-weight: 400; font-size: .85rem; color: var(--lilac); margin-inline-start: .6rem; }
.opt .ar, .opt .en { font-weight: 400; font-size: .85rem; }
.picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.1rem; }
.pick { position: relative; display: block; cursor: pointer; }
.pick input { position: absolute; opacity: 0; inset: 0; }
.pick .frame { background: var(--white); padding: .9rem; box-shadow: inset 0 0 0 6px var(--mist); outline: 3px solid transparent; outline-offset: 3px; transition: outline-color .15s; }
.pick img { display: block; width: 100%; height: auto; }
.pick .cap { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .6rem .2rem 0; color: var(--ink); }
.pick .cap .ar { font-weight: 700; font-size: 1.05rem; line-height: 1.4; } .pick .cap .en { font-weight: 700; font-size: 1rem; color: var(--ink); }
.pick .mark { flex: none; width: 1.6rem; height: 1.6rem; border: 2px solid #a69cb3; border-radius: 50%; display: grid; place-items: center; color: transparent; }
.pick .mark svg { width: .9rem; height: .9rem; }
.pick input:checked ~ .frame { outline-color: var(--lilac); }
.pick input:checked ~ .frame .mark { background: var(--plum); border-color: var(--plum); color: var(--white); }
.pick input:disabled ~ .frame { opacity: .55; }
.pick input:focus-visible ~ .frame { outline: 3px solid var(--white); }
.counter { display: flex; justify-content: space-between; color: var(--lilac); margin: .3rem 0 0; }
.counter .ar { font-size: 1rem; line-height: 1.4; } .counter .en { font-size: .88rem; }

/* ---- statement page (guide: Arabic serif above English, nothing else) ---- */
.shell.is-statement { display: grid; place-items: center; }
.statement { display: grid; place-content: center; text-align: center; padding: 3rem 0; gap: .8rem; justify-items: center; }
.statement .ar { font-family: var(--f-statement); font-size: clamp(1.9rem, 5vw, 3.1rem); line-height: 1.6; text-align: center; }
.statement .en { font-family: var(--f-statement); font-weight: 400; font-size: clamp(1.15rem, 2.4vw, 1.6rem); color: var(--mist); text-align: center; }
.statement .details { margin-top: 1rem; }

dialog { border: 1px solid rgba(255,255,255,.25); background: #26214F; padding: 0; max-width: 460px; width: calc(100% - 2rem); color: var(--white); }
dialog::backdrop { background: rgba(10,8,35,.7); }
dialog .card-b { background: #26214F; }

/* ---- login ---- */
.login-card { max-width: 560px; margin-inline: auto; background: rgba(38,33,79,.82); backdrop-filter: blur(6px); }
body.hero .shell.narrow { display: flex; flex-direction: column; justify-content: center; }
.subline { display: flex; justify-content: center; gap: 1.2rem; margin: 0; }
.login-note { padding: 0 0 1.2rem; }
.login-note .pair { gap: .4rem; grid-template-columns: 1fr; }
.login-note .en { font-size: .95rem; }

/* =========================================================== admin (English) */
.admin { font-size: 15px; }
.admin .shell { direction: ltr; max-width: 1180px; }
.admin h1 { font-family: var(--f-en); font-weight: 600; font-size: 2rem; margin: 0 0 .6rem; }
.admin h2 { font-size: 1.2rem; font-weight: 600; margin: 0 0 .6rem; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; padding: .75rem var(--gutter); background: rgba(10,8,35,.45); direction: ltr; }
.admin-nav a { color: var(--lilac); text-decoration: none; font-weight: 600; }
.admin-nav a:hover, .admin-nav a.on { color: var(--white); text-decoration: underline; text-underline-offset: 6px; }
.admin-nav form { margin-inline-start: auto; }
.sheet { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); padding: 1.3rem; }
.sheet + .sheet { margin-top: 1rem; }
.admin label.field { display: block; font-weight: 600; margin-bottom: 1rem; }
.admin label.field input, .admin label.field select, .admin label.field textarea { margin-top: .3rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }
.tile { background: var(--c-body); border-top: 3px solid var(--c-head); padding: .9rem 1rem; }
.tile b { display: block; font-family: var(--f-en); font-weight: 600; font-size: 1.9rem; line-height: 1.2; }
.tile span { color: var(--lilac); font-size: .85rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,.06); }
th, td { text-align: start; padding: .55rem .75rem; border-bottom: 1px solid rgba(255,255,255,.12); vertical-align: top; }
th { background: rgba(255,255,255,.1); font-weight: 600; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--lilac); }
.chip { display: inline-block; padding: 0 .6rem; border-radius: 99px; font-size: .78rem; background: rgba(255,255,255,.14); margin-inline-end: .25rem; white-space: nowrap; }
.chip.ok { background: #d9ecdf; color: #17432b; } .chip.bad { background: #ffd9d5; color: #7c241e; } .chip.warn { background: #f3e6c2; color: #5f4a10; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: end; }
.bar { height: 14px; background: rgba(255,255,255,.14); margin-top: .3rem; }
.bar i { display: block; height: 100%; background: var(--lilac); }
.bar i.lead { background: var(--white); }
.result-row { display: grid; grid-template-columns: 72px 1fr; gap: 1rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.result-row img { width: 72px; height: 62px; object-fit: contain; background: var(--white); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.mono { font-family: Consolas, monospace; font-size: .9rem; }
.muted { color: var(--lilac); }
.admin .btn { direction: ltr; }
.admin .btn.ghost { border-color: rgba(255,255,255,.5); }

@media (max-width: 700px) {
  .pair, .fields, .two-col { grid-template-columns: 1fr; }
  .picks { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .pick .frame { padding: .5rem; box-shadow: inset 0 0 0 4px var(--mist); }
  .pick .cap .en { letter-spacing: .04em; }
  .top .ministry { width: 130px; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; }
  .foot { flex-direction: column; gap: .2rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* admin extras */
.checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .4rem 1.5rem; }
.checks li { padding: .25rem 0; } .checks li.done { color: var(--lilac); }
.checks a { color: var(--white); }
.alert[hidden] { display: none; }

/* agreement, guide, ranked choice */
.terms-list { display: grid; gap: 1rem; }
.check.term { padding: .8rem 1rem; background: rgba(255,255,255,.07); border-inline-start: 3px solid var(--lilac); }
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.guide-steps li { display: flex; gap: 1rem; align-items: flex-start; }
.guide-steps .n { flex: none; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; background: var(--lilac); color: var(--indigo); font-family: var(--f-en); font-weight: 700; }
.guide-steps .pair { flex: 1; }
.role + .role { margin-top: 1.2rem; }
.role select, .role textarea { margin-top: .3rem; }
.pick.view { cursor: default; margin: 0; }
.support { margin-top: 1rem; font-size: .95rem; color: var(--lilac); }
.support a { color: var(--white); }
.lbl .hint, .hint { color: var(--lilac); }
dialog.wide { max-width: 760px; }
.nda-text { max-height: 55vh; overflow: auto; padding-inline-end: .5rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.sigpad { position: relative; background: #fff; border: 1px solid var(--lilac); margin: .4rem 0 .6rem; }
.sigpad canvas { display: block; width: 100%; height: 150px; touch-action: none; cursor: crosshair; }
.sigpad .sig-hint { position: absolute; inset: auto 0 .4rem 0; text-align: center; color: #9a9a9a; font-size: .85rem; pointer-events: none; }
.sigpad.has-ink .sig-hint { display: none; }

/* ---- choose page: logos stay in view while scrolling; state shown on each logo ---- */
.picks-bar { position: sticky; top: 0; z-index: 30; margin: 0 0 1.2rem; padding: .7rem 0; background: var(--indigo, #2D2B6B); box-shadow: 0 10px 18px -10px rgba(0,0,0,.55); }
.choose-picks { grid-template-columns: repeat(var(--cols, 4), 1fr); gap: .7rem; }
.choose-picks .frame { padding: .45rem; box-shadow: inset 0 0 0 4px var(--mist); outline: 3px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
.choose-picks .thumb { position: relative; background: var(--white); overflow: hidden; }
.choose-picks .thumb img { width: 100%; height: clamp(64px, 14vh, 130px); object-fit: contain; }
.choose-picks .cap { padding: .3rem .1rem 0; }
.choose-picks .cap .ar { font-size: .9rem; } .choose-picks .cap .en { font-size: .8rem; }
.choose-picks .rank { display: none; position: absolute; inset-block-start: .2rem; inset-inline-start: .2rem; min-width: 1.9rem; height: 1.9rem; padding: 0 .3rem; border-radius: 50%; place-items: center; background: var(--plum); color: var(--white); font: 700 1.15rem/1 var(--f-en, sans-serif); box-shadow: 0 0 0 2px var(--white); }
.role { scroll-margin-top: 220px; }
.pick[data-rank] .frame { outline-color: var(--white); box-shadow: inset 0 0 0 4px var(--lilac); }
.pick[data-rank] .rank { display: grid; }
.pick[data-rank="1"] .rank { background: var(--white); color: var(--plum); }

/* full-screen viewer for logo applications */
.viewer { position: fixed; inset: 0; z-index: 100; background: rgba(10,8,35,.96); display: flex; flex-direction: column; }
.viewer[hidden] { display: none; }
.viewer-stage { flex: 1; overflow: auto; display: grid; place-items: center; padding: 1rem; background: #fff; margin: 3.4rem 0 0; cursor: zoom-in; }
.viewer-stage img { display: block; max-width: 100%; max-height: calc(100vh - 7.4rem); object-fit: contain; }
.viewer.zoom .viewer-stage { place-items: start; cursor: zoom-out; }
.viewer.zoom .viewer-stage img { max-width: none; max-height: none; }
.viewer-close { position: absolute; inset-block-start: .5rem; inset-inline-end: .8rem; z-index: 2; width: 2.6rem; height: 2.6rem; font-size: 2rem; line-height: 1; border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff; border-radius: 50%; cursor: pointer; }
.viewer-hint { margin: 0; padding: .6rem 1rem; text-align: center; color: var(--lilac); font-size: .9rem; }
@media (max-width: 700px) {
  .choose-picks { grid-template-columns: repeat(var(--cols, 4), 1fr); gap: .35rem; }
  .choose-picks .frame { padding: .25rem; box-shadow: inset 0 0 0 3px var(--mist); }
  .choose-picks .thumb img { height: clamp(44px, 9vh, 70px); }
  .choose-picks .cap .ar { font-size: .72rem; } .choose-picks .cap .en { font-size: .7rem; }
  .choose-picks .rank { min-width: 1.4rem; height: 1.4rem; font-size: .9rem; }
      .picks-bar { margin-inline: -.2rem; padding: .4rem .2rem; }
}

/* admin: texts editor */
.texts-tabs{display:flex;flex-wrap:wrap;gap:.4rem;margin:0 0 1.2rem}
.texts-tabs a{padding:.4rem .85rem;border:1px solid rgba(255,255,255,.35);border-radius:999px;text-decoration:none;color:#fff;font-size:.9rem}
.texts-tabs a:hover{background:rgba(255,255,255,.12)}
.texts-tabs a.on{background:#fff;color:#591A4F;border-color:#fff;font-weight:600}
.texts-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1.5rem;align-items:start}
.texts-preview{position:sticky;top:.8rem}
.pv-bar{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap;margin-bottom:.5rem}
.pv-bar select{width:auto;min-width:10rem;padding:.35rem .6rem}
.pv-sizes{margin-inline-start:auto;display:flex;gap:.3rem}
.btn.sm{padding:.3rem .8rem;font-size:.85rem}
.btn.sm.on{background:#fff;color:#591A4F;border-color:#fff}
.pv-frame{border:1px solid rgba(255,255,255,.3);overflow:hidden;background:#fff;margin:0 auto}
.pv-frame.desktop{width:100%}.pv-frame.phone{width:390px;max-width:100%}
.pv-frame iframe{width:100%;height:78vh;border:0;display:block}
.trow{margin-bottom:1rem}
.trow .lang{display:block;font-size:.8rem;font-weight:400;color:var(--lilac)}
.trow label.field{margin-bottom:0}
.edited{color:#fff;font-style:normal;font-weight:600;background:rgba(255,255,255,.18);padding:0 .4rem;margin-inline-start:.3rem}
.texts-form h3{font-size:1.05rem;margin:0 0 .8rem}
.texts-form ::placeholder{color:#8a8290;opacity:1}
.texts-form textarea,.texts-form input[type=text]{width:100%}
@media(max-width:1100px){.texts-grid{grid-template-columns:1fr}.texts-preview{position:static}}

.admin textarea{overflow:hidden;resize:vertical;min-height:4.5rem}
.admin textarea[data-single]{min-height:0;resize:none;line-height:1.5;padding:.7rem .85rem}
