@font-face { font-family: Nunito; src: url(fonts/Nunito-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Nunito; src: url(fonts/Nunito-Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: Nunito; src: url(fonts/Nunito-ExtraBold.ttf); font-weight: 800; font-display: swap; }

/* The website's palette (src/app/globals.css). */
:root {
  --cream: #fff7ea;
  --cream-deep: #ffebcc;
  --card: #ffffff;
  --ink: #2d2a4a;
  --ink-soft: #6b6890;
  --line: #eadfcb;
  --grape: #7c4dff;
  --grape-shade: #5524e0;
  --grape-tint: #efe9ff;
  --leaf: #2ebd6b;
  --leaf-shade: #1f8a4d;
  --leaf-tint: #e3f7ea;
  --sunshine: #ffc43d;
  --sunshine-tint: #fff3d1;
  --coral: #ff6b6b;
  --sky: #3fa7f5;
  --radius: 18px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --cream: #1d1b2e;
    --cream-deep: #2a2742;
    --card: #26233b;
    --ink: #f3f0ff;
    --ink-soft: #aba6cf;
    --line: #3a3657;
    --grape: #9b7bff;
    --grape-shade: #7c4dff;
    --grape-tint: #332a5c;
    --leaf: #3fd07f;
    --leaf-shade: #2ebd6b;
    --leaf-tint: #1f3b2c;
    --sunshine-tint: #463a1a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 16px/1.5 Nunito, ui-rounded, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
[hidden] { display: none !important; }

.btn {
  border: 0; border-radius: 12px; padding: 8px 16px;
  background: var(--grape); color: #fff; font-weight: 800;
  box-shadow: 0 3px 0 var(--grape-shade);
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--grape-shade); }
.btn.quiet { background: var(--cream-deep); color: var(--ink); box-shadow: 0 3px 0 var(--line); }
.link { border: 0; background: none; padding: 0; color: var(--ink-soft); text-decoration: underline; font-weight: 700; }
.error { color: var(--coral); font-weight: 700; }

/* ---------- Sign in ---------- */
.login {
  max-width: 440px; min-height: 100dvh; margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  text-align: center; display: grid; justify-items: center; align-content: center; gap: 14px;
}
#login-langs { justify-self: end; }
.login-agugu { width: 140px; height: auto; filter: drop-shadow(0 8px 16px rgba(45, 42, 74, .18)); }
.login h1 { margin: 0; font-weight: 800; font-size: 1.9rem; line-height: 1.15; }
.login p { margin: 0; color: var(--ink-soft); }
.login-intro { font-size: 1.05rem; }
.login .signin { display: grid; gap: 12px; justify-items: center; margin: 8px 0; min-height: 44px; }
#appleid-signin { width: 280px; height: 44px; cursor: pointer; }
.login form { display: flex; gap: 8px; width: 100%; }
.login input { flex: 1; min-width: 0; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); }
.login .fine a { color: inherit; }
.fine { font-size: .85rem; color: var(--ink-soft); margin: 0; }

/* ---------- Segmented controls (language, status, kind) ---------- */
.seg {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px;
  background: var(--cream-deep); border: 1px solid var(--line);
}
.seg button {
  border: 0; background: none; border-radius: 999px; padding: 6px 14px; min-height: 36px;
  font-weight: 800; font-size: .9rem; color: var(--ink-soft); white-space: nowrap;
}
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 18, 35, .18); }
.seg-small button { padding: 3px 10px; min-height: 30px; font-size: .8rem; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--cream) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 980px; margin: 0 auto; padding: 8px 16px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: inherit; text-decoration: none; }
.brand img { border-radius: 9px; }
.me {
  display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px;
  color: var(--ink-soft); font-weight: 700; font-size: .9rem; min-height: 44px; max-width: 60%;
}
#me-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grape); color: #fff; font-weight: 800;
}
.menu {
  position: absolute; right: max(12px, calc((100vw - 980px) / 2 + 12px)); top: calc(env(safe-area-inset-top) + 54px);
  width: min(300px, calc(100vw - 24px)); z-index: 10;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px;
  box-shadow: 0 12px 32px rgba(20, 18, 35, .22); display: grid; gap: 10px;
}
.menu-who { margin: 0; display: grid; overflow-wrap: anywhere; }
.menu-who span { color: var(--ink-soft); font-size: .85rem; }
.menu-label { margin: 4px 0 -4px; font-size: .8rem; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.menu .seg { justify-self: start; }
.menu-item {
  border: 0; border-top: 1px solid var(--line); background: none; text-align: left; padding: 12px 2px 2px;
  font-weight: 800; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.switch { flex: none; width: 42px; height: 26px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.menu-item.on .switch { background: var(--leaf); }
.menu-item.on .switch::after { transform: translateX(16px); }

/* Admins' tabs: the tickets, the voice review, the screens. */
.tabs {
  display: flex; flex-wrap: wrap; gap: 4px;
  max-width: 980px; margin: 0 auto; padding: 0 12px 8px;
}
.tabs button {
  flex: none; border: 0; background: none; border-radius: 999px; padding: 6px 12px; min-height: 36px; font-size: .92rem;
  font-weight: 800; color: var(--ink-soft);
}
.tabs button.on { background: var(--ink); color: var(--cream); }
.tabs small { margin-left: 6px; background: var(--sunshine); color: #2d2a4a; border-radius: 999px; padding: 0 7px; font-size: .75rem; }

/* ---------- The review (admins): the same controls as the tickets ---------- */
.review-head { max-width: 980px; margin: 0 auto; padding: 12px 0 0; }
.langs { margin: 0 16px; }
.seg small { margin-left: 6px; background: var(--sunshine); color: #2d2a4a; border-radius: 999px; padding: 0 7px; font-size: .72rem; }
.review-head .filters { padding-top: 12px; }
.filter-row #status { flex: 1; min-width: 0; }
.speed { flex: none; }

main, .summary, .chips, .keys, .list, .empty { max-width: 980px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }

.summary { margin-top: 12px; }
.progress { height: 10px; border-radius: 999px; background: var(--cream-deep); overflow: hidden; display: flex; }
#progress-ok { background: var(--leaf); }
#progress-open { background: var(--sunshine); }
#summary-text { margin: 6px 0 0; color: var(--ink-soft); font-weight: 700; font-size: .95rem; }

/* Chips scroll sideways, edge to edge on a phone, without a scrollbar. */
.chips {
  display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; padding-top: 2px; padding-bottom: 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-padding: 0 16px;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chips button {
  flex: none; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 6px 12px; min-height: 36px; font-weight: 700; font-size: .9rem;
}
.chips button.on { border-color: var(--grape); color: var(--grape); background: var(--grape-tint); }
.chips small { opacity: .7; margin-left: 4px; }

.keys { color: var(--ink-soft); font-size: .82rem; margin-top: 4px; margin-bottom: 0; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 5px; margin: 0 2px; background: var(--card); font: inherit; font-size: .78rem; }
@media (hover: none) { .keys { display: none; } }

/* ---------- Clips ---------- */
.list { list-style: none; margin-top: 12px; margin-bottom: 80px; display: grid; gap: 8px; }
.item {
  background: var(--card); border: 2px solid transparent; border-radius: var(--radius);
  padding: 10px 12px; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center;
  box-shadow: 0 1px 0 var(--line);
}
.item.sel { border-color: var(--grape); }
.item.is-ok { background: linear-gradient(90deg, var(--leaf-tint), var(--card) 60%); }
.item.has-open { background: linear-gradient(90deg, var(--sunshine-tint), var(--card) 60%); }
.play {
  width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--grape); color: #fff; box-shadow: 0 3px 0 var(--grape-shade);
}
.play.playing { background: var(--grape-shade); box-shadow: none; transform: translateY(2px); }
.play svg { width: 22px; height: 22px; }
.item .title { font-size: 1.1rem; font-weight: 800; line-height: 1.3; }
.thumb { border: 0; padding: 0; background: none; border-radius: 10px; overflow: hidden; width: 92px; box-shadow: 0 2px 8px rgba(45, 42, 74, .18); cursor: zoom-in; }
.thumb img { display: block; width: 100%; height: auto; }
.topic-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--grape-tint); color: var(--grape); }
.topic-icon svg { width: 24px; height: 24px; }
.item.kind-topic { border-style: dashed; border-color: var(--line); }
.item.kind-topic.sel { border-color: var(--grape); }
.area-head { list-style: none; margin-top: 18px; }
.area-head:first-child { margin-top: 0; }
.area-head h2 { margin: 0; font-size: 1.3rem; font-weight: 800; }
.subject { color: var(--ink); margin-left: 4px; }
.zoom { position: fixed; inset: 0; z-index: 20; background: rgba(20, 18, 35, .82); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.zoom img { max-width: 100%; max-height: 100%; object-fit: contain; }
.item .text { font-size: 1.2rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.item .meta { font-size: .8rem; color: var(--ink-soft); font-weight: 700; display: flex; gap: 4px 10px; flex-wrap: wrap; }
.meta .who-ok { color: var(--leaf-shade); }
.meta .stale { color: var(--coral); }
.actions { display: flex; gap: 6px; }
.actions button {
  min-height: 44px; border: 2px solid var(--line); background: var(--card); border-radius: 12px;
  padding: 0 10px; font-weight: 800; display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.actions svg { width: 18px; height: 18px; }
.actions .ok.on { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.actions .talk.has { border-color: var(--sunshine); }
.actions .talk.open { background: var(--grape-tint); border-color: var(--grape); color: var(--grape); }
/* On a phone the buttons lose their labels and stay beside the text: one line per clip. */
@media (max-width: 560px) {
  .item { gap: 4px 10px; padding: 10px; }
  .actions .label { display: none; }
  .actions button { padding: 0 11px; }
}

/* ---------- Threads ---------- */
.threads { grid-column: 1 / -1; margin-top: 8px; display: grid; gap: 10px; }
.thread { border: 2px solid var(--line); border-radius: 14px; overflow: hidden; }
.thread.resolved { opacity: .8; }
.thread-head {
  display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 6px 10px; background: var(--cream-deep); font-size: .82rem; font-weight: 700; color: var(--ink-soft);
}
.badge { border-radius: 999px; padding: 1px 8px; font-weight: 800; font-size: .75rem; }
.badge.open { background: var(--sunshine); color: #2d2a4a; }
.badge.done { background: var(--leaf); color: #fff; }
.badge.take { background: var(--coral); color: #fff; }
.comment { padding: 8px 10px; border-top: 1px solid var(--line); }
.comment:first-of-type { border-top: 0; }
.comment .by { font-size: .82rem; color: var(--ink-soft); font-weight: 700; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.comment .by b { color: var(--ink); }
.comment .body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.comment .tools { margin-left: auto; display: flex; gap: 10px; }
.thread form, .new-thread { padding: 8px 10px; display: grid; gap: 6px; border-top: 1px solid var(--line); }
.new-thread { border: 2px dashed var(--line); border-radius: 14px; }
textarea {
  width: 100%; min-height: 64px; resize: vertical; border: 2px solid var(--line); border-radius: 10px;
  padding: 8px 10px; background: var(--card);
}
.row-buttons { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.collapsed-note { padding: 6px 10px; }

.empty { text-align: center; color: var(--ink-soft); font-weight: 700; margin-top: 40px; }
.toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 64px); transform: translateX(-50%); z-index: 10;
  background: var(--ink); color: var(--cream); padding: 10px 18px; border-radius: 12px; font-weight: 700;
  max-width: calc(100vw - 32px);
}

/* ---------- Tickets (phone first) ---------- */
.tickets-view { max-width: 720px; margin: 0 auto; padding: 0 0 calc(110px + env(safe-area-inset-bottom)); }
.tickets-view:has(#ticket-detail:not([hidden])) { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
.filters { padding: 12px 16px 4px; display: grid; gap: 10px; }
.area-select {
  width: 100%; min-height: 46px; border: 1.5px solid var(--line); border-radius: 14px; background-color: var(--card);
  padding: 8px 40px 8px 14px; font-size: 1rem; font-weight: 700; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a86ad' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.area-select.on { border-color: var(--grape); background-color: var(--grape-tint); color: var(--grape); }
.search {
  width: 100%; min-height: 46px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card);
  padding: 8px 14px 8px 40px; font-size: 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a86ad' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center; background-size: 18px;
}
.filter-row { display: flex; gap: 8px; align-items: center; }
#ticket-status { flex: 1; min-width: 0; }
#ticket-status button { flex: 1; padding: 6px 8px; }
#ticket-kind { flex: none; }
#ticket-kind button { padding: 6px 11px; font-size: 1rem; }
.kind-label { display: none; font-size: .9rem; }
@media (min-width: 480px) { .kind-label { display: inline; } }
#ticket-kind button.on { color: var(--grape); }

.tickets { list-style: none; margin: 8px 0 0; padding: 0 16px; display: grid; gap: 10px; }
.card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 14px; border-radius: var(--radius); background: var(--card); color: inherit; text-decoration: none;
  border: 1px solid var(--line); box-shadow: 0 1px 0 var(--line);
  -webkit-tap-highlight-color: transparent; transition: transform .08s;
}
.card:active { transform: scale(.985); }
.card-emoji {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem;
  background: var(--grape-tint);
}
.card-main { display: grid; gap: 4px; min-width: 0; }
.card-title { font-weight: 800; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .8rem; font-weight: 700; color: var(--ink-soft); margin: 0; }
.card-meta.quiet { font-weight: 600; }
.card.is-done .card-title { color: var(--ink-soft); }
.card.is-done .card-emoji { filter: grayscale(.7); opacity: .7; }
.card.is-hidden, .comment.is-hidden { opacity: .55; }
.chev { color: var(--ink-soft); font-size: 1.6rem; line-height: 1; }
.badge.kind-problem { background: var(--coral); color: #fff; }
.badge.kind-idea { background: var(--sky); color: #fff; }
.lang-tag { border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; }

.empty-state { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 40px 24px; color: var(--ink-soft); font-weight: 700; }
.empty-state img { width: 110px; height: auto; opacity: .95; }
.empty-state p { margin: 0; max-width: 320px; }

/* The big button for a new ticket, over the list, clear of the iPhone's home bar. */
.fab {
  position: fixed; z-index: 6; right: max(16px, calc((100vw - 720px) / 2 + 16px));
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px; border: 0; border-radius: 999px;
  padding: 0 22px 0 18px; min-height: 56px; background: var(--grape); color: #fff;
  font-weight: 800; font-size: 1.05rem; box-shadow: 0 4px 0 var(--grape-shade), 0 10px 24px rgba(85, 36, 224, .35);
}
.fab > span:first-child { font-size: 1.7rem; line-height: 1; margin-top: -3px; }
.fab:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--grape-shade), 0 6px 16px rgba(85, 36, 224, .3); }

/* One ticket, on its own screen. */
.detail { padding-bottom: 8px; }
#ticket-detail:not([hidden]) ~ .fab { display: none; }
.detail-bar { padding: 4px 8px 0; }
.back { border: 0; background: none; color: var(--grape); font-weight: 800; font-size: 1.05rem; min-height: 44px; padding: 0 8px; display: flex; align-items: center; gap: 4px; }
.back { font-size: 1.6rem; line-height: 1; }
.back span { font-size: 1.05rem; }
.detail-body { padding: 0 16px; }
.detail-title { margin: 8px 0 10px; font-size: 1.45rem; line-height: 1.25; font-weight: 800; overflow-wrap: anywhere; }
.detail-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.btn.small { padding: 6px 12px; font-size: .9rem; min-height: 36px; }
.conversation { display: grid; gap: 10px; }
.conversation .comment {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px;
}
.conversation .comment .body { font-size: 1rem; }
.conversation .comment:first-child { border-color: color-mix(in srgb, var(--grape) 35%, var(--line)); }

.composer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; margin: 0 auto; max-width: 720px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--cream) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); display: grid; gap: 8px;
}
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea {
  flex: 1; min-height: 44px; max-height: 160px; resize: none; border-radius: 22px; padding: 10px 16px;
  border: 1.5px solid var(--line); background: var(--card); font-size: 1rem; line-height: 1.4;
}
.icon-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line);
  background: var(--card); font-size: 1.15rem; display: grid; place-items: center; padding: 0;
}
.send { flex: none; border: 0; border-radius: 22px; min-height: 44px; padding: 0 16px; background: var(--grape); color: #fff; font-weight: 800; }

/* Screenshots. */
.pending-shots, .shots { display: flex; gap: 8px; flex-wrap: wrap; }
.pending-shots:empty { display: none; }
.shot { position: relative; border: 0; padding: 0; background: none; border-radius: 12px; overflow: hidden; width: 84px; height: 84px; box-shadow: 0 2px 8px rgba(45, 42, 74, .18); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
button.shot { cursor: zoom-in; }
.comment .shots { margin-top: 8px; }
.shot button { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(20, 18, 35, .7); color: #fff; font-weight: 800; line-height: 1; padding: 0; }

/* ---------- The new ticket: a full-screen sheet on a phone, a dialog on a wide screen ---------- */
.sheet {
  border: 0; padding: 0; margin: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  background: var(--cream); color: var(--ink);
}
.sheet::backdrop { background: rgba(20, 18, 35, .55); }
.sheet[open] { animation: sheet-up .22s ease-out; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } }
.ticket-form { height: 100%; display: grid; grid-template-rows: auto 1fr auto; }
.sheet-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px 20px; border-bottom: 1px solid var(--line);
}
.sheet-bar h2 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.sheet-body { overflow-y: auto; padding: 16px 20px 24px; display: grid; gap: 14px; align-content: start; }
.sheet-foot { padding: 10px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--cream); }
.btn.big { width: 100%; min-height: 52px; font-size: 1.1rem; border-radius: 16px; }
.btn.attach { justify-self: start; }
.field { display: grid; gap: 6px; font-weight: 800; font-size: .9rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card);
  padding: 10px 12px; font-size: 1rem; font-weight: 600;
}
.field textarea { min-height: 130px; resize: vertical; font-weight: 400; }
.kinds { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kinds label { display: block; }
.kinds input { position: absolute; opacity: 0; pointer-events: none; }
.kinds span {
  display: grid; gap: 4px; height: 100%; padding: 14px; border-radius: 16px; cursor: pointer;
  border: 2px solid var(--line); background: var(--card);
}
.kinds b { font-size: 1.05rem; }
.kinds small { color: var(--ink-soft); font-weight: 600; line-height: 1.3; }
.kinds input:checked + span { border-color: var(--grape); background: var(--grape-tint); box-shadow: 0 0 0 2px var(--grape) inset; }
.kinds input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (min-width: 640px) {
  .sheet { width: min(560px, calc(100vw - 32px)); height: auto; max-height: min(860px, calc(100dvh - 48px)); margin: auto; border-radius: 22px; box-shadow: 0 24px 60px rgba(20, 18, 35, .35); }
  .ticket-form { max-height: min(860px, calc(100dvh - 48px)); }
  .sheet-bar { padding-top: 12px; }
  .tickets-view { padding-top: 8px; }
  .fab { bottom: 28px; }
  .detail-body, .filters, .tickets { padding-left: 20px; padding-right: 20px; }
  /* Search and the part of the app side by side; status and kind below. */
  .filters { grid-template-columns: 1fr 260px; }
  .filter-row { grid-column: 1 / -1; }
  .composer { position: sticky; border: 1px solid var(--line); border-radius: 20px; margin: 16px 20px 20px; padding-bottom: 10px; bottom: 16px; }
  .tickets-view:has(#ticket-detail:not([hidden])) { padding-bottom: 24px; }
}
