/* أزياؤنا · the public pages' shapes, from ti-prototype's base.css with بنفسج's own rules folded in
   designed at 390 wide first, the column grows to 520 on a wider screen · colours and fonts come from tokens.css */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.6; min-height: 100svh; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 520px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-bottom: 40px; }
a { color: inherit; }
img, svg { display: block; }
.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the masthead: the mark beside the wordmark */
.masthead { background: var(--accent); color: var(--cream); padding: 18px 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mark { width: 40px; height: 40px; flex-shrink: 0; }
.mark .line { fill: none; stroke: var(--mark); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.mark .dot { fill: var(--mark-dot); }
.wordmark { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.15; display: block; }
.sub { color: var(--sub-on-accent); font-size: 12.5px; display: block; }
.upload-btn { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; background: var(--cream); color: var(--accent);
  text-decoration: none; font-weight: 600; font-size: 14px; padding: 10px 16px; border-radius: 999px; }
.staff-link { color: var(--cream); font-size: 13px; text-decoration: underline; }

/* one textile line under the header */
.motif { height: 14px; background: var(--motif) 0 0 / 20px 14px repeat-x; }

/* what just happened */
.messages { margin-top: 14px; display: grid; gap: 8px; }
.msg { padding: 12px 14px; border-radius: var(--radius-field); font-weight: 600; font-size: 14px; }
.msg-success { background: var(--accent-soft); color: var(--accent); }
.msg-error { background: #FBEDEA; color: var(--bad); }

/* the home */
.story { margin: 14px 0 18px; }
.story h2 { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--brown); }
.intro { color: var(--ink-soft); font-size: 14px; }
.intro p + p { margin-top: 6px; }
.halls-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 8px; }

/* the region halls: one row that slides under the thumb */
.chips { display: flex; gap: 8px; margin: 0 -16px 18px; padding: 0 16px 2px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { font-size: 14px; white-space: nowrap; text-decoration: none; background: var(--surface); color: var(--ink);
  border: var(--border); border-radius: var(--radius-chip); padding: 6px 15px; }
.chips a.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }

/* the works, two to a row */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.work { background: var(--surface); border: var(--border); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; display: block; }
.art { aspect-ratio: 1; overflow: hidden; background: var(--surface-2); }
.art img { width: 100%; height: 100%; object-fit: cover; }
.label { padding: 10px 12px 12px; border-top: 3px solid var(--beige); }
.region { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--brown); margin-bottom: 4px; }
.label h3 { font-family: var(--font-display); font-size: 15.5px; font-weight: 600; line-height: 1.4; }
.by { color: var(--ink-soft); font-size: 12.5px; }
.stats { display: flex; gap: 14px; margin-top: 6px; font-size: 12.5px; color: var(--brown); }
.stats span { display: inline-flex; align-items: center; gap: 4px; }
.empty { color: var(--ink-soft); padding: 30px 0; text-align: center; grid-column: 1 / -1; }

/* a page under the masthead */
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink-soft); font-size: 14px; margin-top: 14px; }
.page-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin: 4px 0 16px; line-height: 1.3; }

/* one design and its words */
.piece { background: var(--surface); border: var(--border); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 22px; }
.piece .art { aspect-ratio: auto; }
.piece .art img { height: auto; max-height: 75svh; object-fit: contain; margin: 0 auto; }
.words-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.words { list-style: none; display: grid; gap: 10px; margin-bottom: 22px; }
.words li { background: var(--surface); border: var(--border); border-radius: var(--radius-field); padding: 10px 12px; }
.words b { display: block; font-size: 13px; color: var(--brown); }
.words p { font-size: 14.5px; }
.quiet { color: var(--ink-soft); font-size: 14px; margin-bottom: 22px; }

/* forms */
.form { display: grid; gap: 16px; }
.drop { display: grid; place-items: center; text-align: center; cursor: pointer; min-height: 180px; padding: 18px;
  background: var(--accent-soft); color: var(--accent); border: 2px dashed var(--accent); border-radius: var(--radius-card); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop .ico { width: 34px; height: 34px; margin: 0 auto 6px; }
.drop b { font-size: 16px; color: var(--ink); }
.drop small { color: var(--ink-soft); font-size: 12.5px; display: block; }
.drop .chosen { color: var(--accent); font-weight: 600; font-size: 14px; margin-top: 6px; word-break: break-all; }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.field { display: grid; gap: 6px; }
.field > span, .kinds legend { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; color: var(--ink); width: 100%; background: var(--surface);
  border: var(--border); border-radius: var(--radius-field); padding: 12px 14px; outline: none; }  /* 16px, so a phone never zooms in */
.field input::placeholder, .field textarea::placeholder { color: var(--ink-soft); opacity: .8; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field small { color: var(--ink-soft); font-size: 12.5px; }
.kinds { border: 0; }
.kinds legend { margin-bottom: 8px; }
.kinds > div { display: flex; flex-wrap: wrap; gap: 8px; }
.kinds label { position: relative; }
.kinds input { position: absolute; opacity: 0; }
.kinds span { display: inline-block; border: var(--border); border-radius: var(--radius-chip); padding: 6px 15px; font-size: 14px; cursor: pointer; background: var(--surface); }
.kinds input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.kinds input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.note { font-size: 13px; color: var(--ink-soft); }
.send { font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--radius-field); padding: 14px; }
.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }  /* off sight without pushing the page sideways */

.foot { text-align: center; color: var(--ink-soft); font-size: 12.5px; padding: 24px 16px 32px; border-top: var(--border); margin-top: 10px; }

/* a wider screen: three works to a row, the column a little wider */
@media (min-width: 760px) {
  .wrap { max-width: 760px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .chips { flex-wrap: wrap; overflow: visible; }
}
