@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; 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+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2') format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; 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+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; 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+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-sans-arabic-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; 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+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/*
  shared layout for every theme. themes override the tokens below
  and add their own decoration in themes/<slug>/style.css
*/
:root {
  --bg: #F4F5F1;
  --surface: #FFFFFF;
  --surface-2: #EEF0EA;
  --line: #E1E4DC;
  --ink: #1B2733;
  --ink-2: #55606C;
  --ink-3: #8D96A0;

  --primary: #1F6F5C;
  --primary-d: #165244;
  --on-primary: #FFFFFF;
  --accent: #E9B23A;
  --accent-d: #B98715;
  --danger: #C8463D;
  --danger-d: #9C332C;
  --info: #2F5E9E;
  --info-d: #224677;

  --btn-bg: var(--primary);
  --btn-sh: var(--primary-d);
  --btn-fg: var(--on-primary);
  --paper-btn-sh: #D6DAD0;

  --ok-bg: #E5F2EC;
  --err-bg: #FBEAE8;
  --warn-bg: #FCF3DC;

  --day-head: var(--primary);
  --day-head-today: var(--info);
  --day-head-closed: #9AA1AB;
  --taken-1: #FCEFCB;
  --taken-2: #E4EEF8;
  --taken-3: #E3F1E9;
  --free-line: #B9D4C9;
  --off-a: #ECEEE8;
  --off-b: #F6F7F3;
  --highlight: rgba(233, 178, 58, .35);

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(27, 39, 51, .06), 0 8px 24px -16px rgba(27, 39, 51, .25);
  --font-body: 'IBM Plex Sans Arabic', Tahoma, Arial, sans-serif;
  --font-display: 'IBM Plex Sans Arabic', Tahoma, Arial, sans-serif;
  --display-weight: 700;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; display: block; }
a { color: var(--info); }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 12px; }

.ic { width: 1.15em; height: 1.15em; flex: none; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.muted { color: var(--ink-2); }
.hint { color: var(--ink-3); font-size: .85rem; font-weight: 400; }
.center { text-align: center; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 620px; }
.section { margin-top: 44px; }
.site-main { flex: 1; padding-bottom: 60px; }

.holes { display: none; }

.preview-bar {
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: .92rem;
}
.preview-bar a { color: var(--accent); margin-inline-start: 10px; font-weight: 700; }

.site-header {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 22px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; min-width: 0; }
.brand-logo { width: 56px; height: 56px; flex: none; display: grid; place-items: center; }
.brand-logo img, .brand-logo svg { width: 100%; height: 100%; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.45rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-sub { font-size: .9rem; color: var(--ink-2); }
.header-actions { margin-inline-start: auto; display: flex; gap: 10px; align-items: center; }
.header-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 6px 4px; }
.header-link:hover { color: var(--ink); }

/* buttons are always solid fills */
.btn {
  --bg: var(--btn-bg);
  --sh: var(--btn-sh);
  --fg: var(--btn-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1rem;
  line-height: 1.25;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 3px 0 var(--sh);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  top: 0;
  transition: top .08s, box-shadow .08s, filter .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { top: 2px; box-shadow: 0 1px 0 var(--sh); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn-red { --bg: var(--danger); --sh: var(--danger-d); --fg: #fff; }
.btn-green { --bg: var(--primary); --sh: var(--primary-d); --fg: var(--on-primary); }
.btn-blue { --bg: var(--info); --sh: var(--info-d); --fg: #fff; }
.btn-paper { --bg: var(--surface); --sh: var(--paper-btn-sh); --fg: var(--ink); }
.btn-sm { font-size: .92rem; padding: 7px 13px; }
.btn-xs { font-size: .85rem; padding: 5px 9px; box-shadow: 0 2px 0 var(--sh); font-family: var(--font-body); font-weight: 700; }
.btn-lg { font-size: 1.1rem; padding: 12px 24px; }
.btn-block { width: 100%; }
.btn.is-disabled { opacity: .4; pointer-events: none; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 200px;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.1rem;
  padding: 13px 28px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: 0 3px 0 var(--btn-sh);
  cursor: pointer;
  position: relative;
  top: 0;
}
.btn-submit:hover { filter: brightness(1.06); }
.btn-submit:active { top: 2px; box-shadow: 0 1px 0 var(--btn-sh); }
.btn-submit:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; color: var(--danger); text-decoration: underline; cursor: pointer; }

.card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 26px 26px;
  box-shadow: var(--shadow);
}
.card-title { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.4rem; line-height: 1.3; margin: 0 0 16px; }
.card-kraft { background: var(--surface); }
.card-note { background: var(--surface-2); box-shadow: none; }
.side { display: flex; flex-direction: column; gap: 24px; }
.side-art { width: 72px; margin-bottom: 4px; }
.rules { margin: 0; padding: 0; list-style: none; }
.rules li { position: relative; padding-inline-start: 22px; margin-bottom: 8px; }
.rules li::before { content: ""; position: absolute; right: 2px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }

.hero {
  margin-top: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
}
.kicker { display: inline-block; font-weight: 700; font-size: .9rem; color: var(--primary); margin-bottom: 8px; }
.hero h1 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.25; margin-bottom: 14px; }
.hero h1 mark { color: inherit; background: none; color: var(--primary); }
.hero p { font-size: 1.1rem; color: var(--ink-2); max-width: 38ch; }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 22px; }
.hero-art svg, .hero-art .hero-img { width: 100%; height: auto; }
.stamp { display: inline-flex; align-items: baseline; gap: 6px; color: var(--ink-2); font-weight: 500; }
.stamp b { font-size: 1.3rem; color: var(--primary); }
.polaroid { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.polaroid img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.notice {
  margin-top: 30px;
  background: var(--warn-bg);
  padding: 16px 22px;
  border-radius: var(--radius);
  font-weight: 500;
}

.scribble { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.7rem; line-height: 1.3; }

.board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.week-nav { display: flex; align-items: center; gap: 10px; }
.week-label { font-weight: 700; min-width: 150px; text-align: center; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 14px 0 0; color: var(--ink-2); font-size: .9rem; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.lg { width: 18px; height: 14px; border-radius: 3px; display: inline-block; }
.lg-free { background: var(--surface); border: 2px dashed var(--free-line); }
.lg-taken { background: var(--taken-1); }
.lg-off { background: repeating-linear-gradient(-45deg, var(--off-a) 0 3px, var(--off-b) 3px 6px); }

.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: 18px; }
.day { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.day-head { position: relative; background: var(--day-head); color: #fff; text-align: center; padding: 12px 10px 9px; }
.is-today .day-head { background: var(--day-head-today); }
.is-closed .day-head { background: var(--day-head-closed); }
.dname { display: block; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.15rem; line-height: 1.2; }
.ddate { display: block; font-size: .85rem; opacity: .9; }
.today-pin { position: absolute; top: 9px; left: 8px; font-size: .72rem; font-weight: 700; background: var(--accent); color: var(--ink); padding: 0 7px; border-radius: 4px; }
.day-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.slot { display: flex; flex-direction: column; padding: 7px 11px; border-radius: var(--radius-sm); min-height: 56px; text-decoration: none; color: inherit; font-size: .9rem; line-height: 1.45; }
.slot-label { font-weight: 700; font-size: .8rem; color: var(--ink-2); }
.slot.free { background: var(--surface); border: 2px dashed var(--free-line); transition: background .15s, border-color .15s; }
.slot.free:hover, .slot.free:focus-visible { background: var(--ok-bg); border-color: var(--primary); border-style: solid; outline: none; }
.slot-free { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-weight: 700; }
.slot-free .ic { width: 1em; height: 1em; }
.slot.taken { background: var(--taken-1); }
.slot.taken:nth-child(3n+2) { background: var(--taken-2); }
.slot.taken:nth-child(3n) { background: var(--taken-3); }
.slot-who { font-weight: 700; overflow-wrap: anywhere; }
.slot-meta { font-size: .8rem; color: var(--ink-2); }
.slot.off { background: repeating-linear-gradient(-45deg, var(--off-a) 0 4px, var(--off-b) 4px 8px); color: var(--ink-3); }
.slot.off .slot-label { color: var(--ink-3); }
.day-closed { flex: 1; min-height: 180px; display: grid; place-items: center; padding: 16px; text-align: center; background: repeating-linear-gradient(-45deg, var(--off-a) 0 6px, var(--off-b) 6px 12px); }
.day-closed span { font-weight: 700; color: var(--ink-2); background: var(--surface); padding: 4px 12px; border-radius: var(--radius-sm); }

.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 30px; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
.form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: 1 / -1; }
.field { margin-bottom: 16px; min-width: 0; }
.field > label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 5px; }
.input {
  --hl: linear-gradient(var(--surface-2), var(--surface-2));
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--hl);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s, background .15s;
}
.input::placeholder { color: var(--ink-3); }
.input:focus { --hl: linear-gradient(var(--surface), var(--surface)); border-bottom-color: var(--primary); box-shadow: 0 0 0 3px var(--highlight); }
select.input {
  appearance: none;
  -webkit-appearance: none;
  padding-left: 34px;
  cursor: pointer;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 7l6 7 6-7z' fill='%2355606C'/%3E%3C/svg%3E") no-repeat left 12px center / 12px 12px,
    var(--hl);
}
select.input option:disabled { color: #b3b8bf; }
textarea.input { resize: vertical; line-height: 1.8; }
.has-error .input { border-bottom-color: var(--danger); --hl: linear-gradient(var(--err-bg), var(--err-bg)); }
.err { display: block; color: var(--danger); font-size: .85rem; font-weight: 700; margin-top: 4px; }
.form-foot { margin-top: 10px; display: flex; justify-content: flex-start; }
.hp { position: absolute; right: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inline-form { display: flex; gap: 12px; align-items: center; }
.inline-form .input { flex: 1; min-width: 0; }
.input-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.2rem; letter-spacing: .3em; text-transform: uppercase; text-align: center; }
.input-license { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.pulse { animation: pulse 1s ease; }
@keyframes pulse {
  0% { box-shadow: var(--shadow), 0 0 0 0 var(--highlight); }
  70% { box-shadow: var(--shadow), 0 0 0 16px rgba(0, 0, 0, 0); }
  100% { box-shadow: var(--shadow); }
}

.flashes:empty { display: none; }
.flashes { margin-top: 18px; }
.flash { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border-radius: var(--radius-sm); font-weight: 500; }
.flash > span:last-child { color: var(--ink); }
.flash-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none; background: var(--fc); }
.flash-ic .ic { color: #fff; width: 16px; height: 16px; }
.flash-ok { --fc: var(--primary); background: var(--ok-bg); }
.flash-err { --fc: var(--danger); background: var(--err-bg); }
.flash-warn { --fc: var(--accent-d); background: var(--warn-bg); }
.flash a { color: var(--info); font-weight: 700; }

.empty { text-align: center; padding: 26px 10px 10px; color: var(--ink-2); }
.empty svg { width: 170px; margin: 0 auto 8px; }

.success-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 30px; align-items: start; margin-top: 30px; }
.success-art svg { width: 100%; }
.summary { margin: 0 0 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }
.summary div { border-bottom: 1px solid var(--line); padding: 8px 0; }
.summary dt { font-size: .82rem; color: var(--ink-2); }
.summary dd { margin: 0; font-weight: 700; }
.ticket { background: var(--surface-2); padding: 16px 22px; margin: 0 0 22px; border-radius: var(--radius); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 18px; }
.ticket-label { font-weight: 700; color: var(--ink-2); }
.ticket-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.8rem; font-weight: 700; letter-spacing: .25em; color: var(--primary-d); }
.ticket-note { grid-column: 1 / -1; margin: 6px 0 0; font-size: .88rem; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 8px; }

.setup-pending { margin-top: 50px; max-width: 560px; }
.setup-art svg { width: 190px; margin: 0 auto 10px; }
.login-wrap { display: grid; place-items: center; padding-top: 50px; }
.library-card { position: relative; width: 100%; max-width: 430px; background: var(--surface); padding: 28px 30px 30px; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.lc-pocket { position: absolute; top: 22px; left: 24px; width: 48px; }
.lc-head { margin-bottom: 18px; }
.lc-kicker { font-size: .85rem; font-weight: 700; color: var(--primary); }
.lc-head h1 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.7rem; line-height: 1.3; }
.lc-row { margin-bottom: 16px; }
.lc-row label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 5px; }
.lc-stamp { display: none; }

.admin-wrap { width: 100%; max-width: 1180px; margin: 28px auto 60px; padding: 0 22px; flex: 1; }
.tabs { display: flex; gap: 4px; padding-inline-start: 10px; position: relative; z-index: 1; flex-wrap: wrap; }
.tab { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1rem; color: var(--ink-2); text-decoration: none; background: var(--surface-2); padding: 10px 18px; border-radius: var(--radius) var(--radius) 0 0; }
.tab:hover { color: var(--ink); }
.tab.active { background: var(--surface); color: var(--primary); }
.panel { background: var(--surface); border-radius: var(--radius); padding: 28px 28px 32px; box-shadow: var(--shadow); min-height: 300px; position: relative; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.panel-title { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.6rem; line-height: 1.3; }
.lead { color: var(--ink-2); max-width: 66ch; }

.tally-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.tally { min-width: 130px; padding: 12px 18px; border-radius: var(--radius); display: flex; align-items: baseline; gap: 10px; background: var(--surface-2); }
.tally b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.8rem; line-height: 1; color: var(--primary); }
.tally span { font-weight: 700; color: var(--ink-2); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--radius); padding: 4px; gap: 4px; }
.seg a { text-decoration: none; color: var(--ink-2); font-weight: 700; padding: 6px 16px; border-radius: var(--radius-sm); }
.seg a.on { background: var(--btn-bg); color: var(--btn-fg); }
.search { display: flex; gap: 10px; align-items: center; flex: 0 1 340px; }
.search .input { flex: 1; }

.date-group { margin-bottom: 28px; }
.date-tab { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.05rem; background: var(--day-head); color: #fff; padding: 6px 16px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; position: relative; }
.date-tab.is-today { background: var(--day-head-today); }
.date-tab .today-pin { position: static; }
.ledger { width: 100%; border-collapse: collapse; font-size: .95rem; }
.ledger th { text-align: start; font-weight: 700; font-size: .85rem; color: var(--ink-2); padding: 10px 12px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); white-space: nowrap; }
.ledger td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ledger tbody tr:hover td { background: var(--bg); }
.period-chip { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: .85rem; }
.act { display: flex; gap: 8px; justify-content: flex-end; }
.act form { margin: 0; }
.mail-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 700; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.mail-badge .ic { width: .95em; height: .95em; }
.mail-badge.ok { background: var(--ok-bg); color: var(--primary); }
.mail-badge.bad { background: var(--err-bg); color: var(--danger); cursor: help; }
.mail-badge.off { color: var(--ink-3); }

.status-pill, .domain-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; padding: 5px 14px; border-radius: 20px; }
.status-pill.ok { background: var(--ok-bg); color: var(--primary); }
.status-pill.bad { background: var(--err-bg); color: var(--danger); }
.status-pill.none { background: var(--warn-bg); color: var(--accent-d); }
.domain-chip { background: var(--surface-2); color: var(--ink-2); font-weight: 500; }
.domain-chip b { color: var(--ink); }

.set-block { padding: 24px 0 8px; border-top: 1px solid var(--line); }
.set-block:first-of-type { border-top: 0; padding-top: 0; }
.set-title { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.25rem; margin-bottom: 16px; }
.set-title .num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--btn-bg); color: var(--btn-fg); font-size: 1rem; }
.set-title .num .ic { width: 18px; height: 18px; }
.db-form { border-top: 0; max-width: 760px; }
.save-bar { position: sticky; bottom: 0; margin: 20px -28px -32px; padding: 16px 28px; background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); display: flex; justify-content: flex-start; z-index: 3; }
.upload { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.upload > div:last-child, form.upload > div { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.upload-preview { flex: none; display: grid; place-items: center; background: var(--bg); border-radius: var(--radius-sm); padding: 8px; }
.logo-preview { width: 84px; height: 84px; }
.banner-preview { width: 150px; height: 96px; }
.favicon-preview { width: 64px; height: 64px; }
.upload-preview img, .upload-preview svg { max-width: 100%; max-height: 100%; object-fit: contain; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-name { font-size: .85rem; }

.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; font-size: .95rem; margin: 6px 0; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { flex: none; width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--ink-3); transition: background .15s; }
.check input:checked + .box {
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
  box-shadow: none;
}
.check input:focus-visible + .box { outline: 3px solid var(--accent); outline-offset: 2px; }
.check.big { font-size: 1rem; margin-bottom: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-block; cursor: pointer; font-weight: 700; padding: 7px 16px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink-2); transition: background .15s; user-select: none; }
.chip input:checked + span { background: var(--danger); color: #fff; text-decoration: line-through; }
.chip-pick input:checked + span { background: var(--btn-bg); color: var(--btn-fg); text-decoration: none; }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.ranges { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 14px; }
.range-row { display: grid; grid-template-columns: 170px 170px 1fr auto; gap: 12px; align-items: center; }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; margin: 6px 0 30px; }
.theme-card { background: var(--surface); border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); overflow: hidden; display: flex; flex-direction: column; }
.theme-card.is-active { box-shadow: 0 0 0 3px var(--primary); }
.theme-shot { position: relative; aspect-ratio: 16 / 10; background: var(--bg); display: grid; place-items: center; overflow: hidden; }
.theme-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.theme-shot svg { width: 50%; }
.theme-flag { position: absolute; top: 10px; right: 10px; background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: .8rem; padding: 2px 10px; border-radius: 20px; }
.theme-info { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.theme-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.theme-title h2 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.2rem; }
.theme-meta { font-size: .85rem; color: var(--ink-3); margin: 0; }
.theme-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 10px; }
.theme-actions form { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 20px; white-space: nowrap; }
.badge .ic { width: 1em; height: 1em; }
.badge-free { background: var(--surface-2); color: var(--ink-2); }
.badge-ok { background: var(--ok-bg); color: var(--primary); }
.badge-lock { background: var(--warn-bg); color: var(--accent-d); }
.license-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.license-form label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 4px; }

.modal {
  width: min(440px, calc(100vw - 32px));
  border: 0;
  border-radius: var(--radius);
  padding: 30px 26px 26px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45);
  text-align: center;
}
.modal::backdrop { background: rgba(20, 28, 36, .55); }
.modal-close-form { position: absolute; top: 10px; left: 10px; margin: 0; }
.modal-x { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); cursor: pointer; }
.modal-x:hover { color: var(--ink); }
.modal-title { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.35rem; line-height: 1.35; margin: 4px 0 10px; }
.wa-badge { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: #25D366; display: grid; place-items: center; box-shadow: 0 4px 0 #1A9E4B; }
.wa-badge svg { width: 36px; height: 36px; }
.wa-number { font-size: 1.3rem; font-weight: 700; letter-spacing: .04em; margin: 4px 0 16px; }
.btn-wa { --bg: #25D366; --sh: #1A9E4B; --fg: #fff; }

/* footer with the signature in the bottom right corner */
.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 12px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.signature { height: 46px; width: auto; max-width: 220px; object-fit: contain; }
.footer-text { color: var(--ink-3); font-size: .85rem; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 520px; }
  .split { grid-template-columns: 1fr; }
  .success-card { grid-template-columns: 1fr; }
  .success-art { max-width: 200px; }
}

@media (max-width: 720px) {
  .wrap, .site-header, .admin-wrap { padding-left: 16px; padding-right: 16px; }
  .brand-logo { width: 46px; height: 46px; }
  .brand-name { font-size: 1.2rem; }
  .header-link span, .header-actions .btn span { display: none; }
  .card { padding: 24px 18px 22px; }
  .form-grid, .form-grid.cols-4 { grid-template-columns: 1fr 1fr; gap: 4px 14px; }
  .form-grid .span-3, .form-grid .span-4 { grid-column: 1 / -1; }
  .form-grid > .field.span-2 { grid-column: 1 / -1; }
  .summary { grid-template-columns: 1fr; }
  .ticket { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .btn-submit { width: 100%; }
  .day-body { display: grid; grid-template-columns: 1fr 1fr; }
  .week-label { min-width: 0; font-size: .9rem; }
  .panel { padding: 22px 16px 26px; }
  .save-bar { margin: 20px -16px -26px; padding: 14px 16px; }
  .tab { padding: 8px 12px; font-size: .92rem; }
  .range-row { grid-template-columns: 1fr 1fr auto; }
  .range-row input[type=text] { grid-column: 1 / 3; grid-row: 2; }
  .range-row .btn { grid-row: 1 / 3; grid-column: 3; align-self: center; }
  .upload { flex-direction: column; align-items: flex-start; }
  .theme-grid { grid-template-columns: 1fr; }

  .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tr, .ledger td { display: block; width: 100%; }
  .ledger tr { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; margin-top: 10px; }
  .ledger td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; }
  .ledger td::before { content: attr(data-label); color: var(--ink-3); font-size: .82rem; font-weight: 700; }
  .ledger td.actions { padding-top: 10px; }
  .ledger td.actions::before { display: none; }
  .ledger td.actions .act { justify-content: flex-start; }
}

@media print {
  body { background: #fff; }
  .holes, .preview-bar, .site-header, .tabs, .site-footer, .no-print, .flash, .tally-row { display: none !important; }
  .admin-wrap { margin: 0; padding: 0; max-width: none; }
  .panel { box-shadow: none; padding: 0; }
  .date-tab { color: #000; background: none; border-bottom: 2px solid #000; padding: 0; }
  .ledger td { border-bottom: 1px solid #999; }
}

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