/* Ewe Turn crew hub: bright plush look (round 3). Cloud page, pillow panels, mint + lavender. */
:root {
  scrollbar-gutter: stable;
  color-scheme: light;
  --cloud: #f8f6fb;
  --paper: #ffffff;
  --ink: #2b2540;
  --soft: #625c78;
  --mint: #cdebd6;
  --mint-soft: #eaf6ee;
  --sage: #9fcfae;
  --moss: #3d7350;
  --lilac: #e3d8f7;
  --lilac-soft: #f4f1fa;
  --lavender: #b9a3e8;
  --plum: #6b4fb0;
  --line: #e6dff3;
  --line-soft: #eee9f6;
  --amber-ink: #8a4b12;
  --shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 14px 34px rgba(90, 70, 140, .10), 0 2px 6px rgba(90, 70, 140, .06);
  --shadow-sm: 0 4px 14px rgba(43, 37, 64, .08);
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  font: 100%/1.55 var(--body);
  background: var(--cloud);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(34rem 26rem at -8rem -6rem, var(--mint) 0, transparent 70%),
    radial-gradient(36rem 28rem at calc(100% + 8rem) 2rem, var(--lilac) 0, transparent 70%),
    var(--cloud);
  background-repeat: no-repeat;
  color: var(--ink);
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button, select, input, textarea {
  min-height: 2.75rem;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  padding: .45rem .85rem;
}
button {
  font-family: var(--display);
  font-weight: 600;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
button:hover { box-shadow: 0 6px 18px rgba(90, 70, 140, .16); transform: translateY(-1px); }
button:active { transform: translateY(0); }
button:disabled { opacity: .6; cursor: wait; transform: none; }
input:hover, select:hover, textarea:hover { border-color: var(--lavender); }
input::placeholder, textarea::placeholder { color: #8a84a0; }
select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--plum) 50%), linear-gradient(135deg, var(--plum) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
input[type="checkbox"] {
  appearance: none;
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 2px solid var(--lavender);
  border-radius: 7px;
  background: var(--paper) center / 80% no-repeat;
  box-shadow: none;
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease;
}
input[type="checkbox"]:checked {
  border-color: var(--sage);
  background-color: var(--sage);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%232b2540' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
input[type="checkbox"]:disabled { cursor: default; opacity: .75; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--plum); }
a { color: var(--plum); font-weight: 700; overflow-wrap: anywhere; text-underline-offset: .18em; }
a:hover { color: var(--ink); }
p, h1, h2, h3 { margin: 0; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.15; }
.wrap { width: min(100% - 2rem, 76rem); margin-inline: auto; }
.muted, #access { color: var(--soft); }
.eyebrow {
  font: 500 .75rem/1.4 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--moss);
}

/* Masthead */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding-block: 1rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); font: 700 1.35rem/1 var(--display); text-decoration: none; }
.brand img {
  display: block; width: 2.9rem; height: 2.9rem; flex: none; padding: .3rem;
  border-radius: 50%; background: var(--paper); box-shadow: var(--shadow-sm);
}
.account { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .75rem; }
#access:not(:empty) {
  font: 500 .75rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  padding: .35rem .75rem; border-radius: 99px; background: rgba(255, 255, 255, .7);
}
.public-link {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: .45rem 1rem;
  border-radius: 99px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm);
  font: 600 .95rem var(--display); text-decoration: none;
}
.public-link:hover { color: var(--plum); }
#sign-out { border-radius: 99px; }

/* Dashboard shell: one big pillow, sidebar section nav on wide screens */
main.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 3rem;
  background: var(--paper);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: clip;
}
main.wrap > * { min-width: 0; }
main.wrap > :not(.hero, #teams) { margin-inline: clamp(.85rem, 3vw, 1.75rem); }
.hero {
  padding: clamp(1.4rem, 4vw, 2.2rem) clamp(1rem, 4vw, 2.25rem);
  background: linear-gradient(120deg, var(--mint), #f3eefc 55%, var(--lilac));
}
.hero h1 { margin-top: .2rem; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.05; }
.hero p:not(.eyebrow) { margin-top: .45rem; color: var(--soft); font-size: 1.1rem; max-width: 36rem; }

.tabs { display: flex; flex-wrap: wrap; gap: .4rem; padding: .85rem clamp(.85rem, 3vw, 1.75rem); background: var(--lilac-soft); }
.tabs button {
  min-height: 2.75rem; padding: .4rem .95rem; border-radius: 14px;
  background: transparent; color: var(--soft); box-shadow: none; text-align: left;
}
.tabs button:hover { background: rgba(255, 255, 255, .7); color: var(--ink); transform: none; }
.tabs [aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 3px 10px rgba(90, 70, 140, .12); }

@media (min-width: 56rem) {
  main.wrap {
    grid-template-columns: 13.5rem minmax(0, 1fr);
    grid-template-rows: auto repeat(7, auto) 1fr;
  }
  .hero { grid-column: 1 / -1; }
  #teams {
    grid-column: 1;
    grid-row: 2 / -1;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: .3rem;
    padding: 1.25rem 1rem;
  }
  #teams::before {
    content: "Sections";
    padding: 0 .95rem .35rem;
    font: 500 .7rem/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--soft);
  }
  main.wrap > :not(.hero, #teams) { grid-column: 2; }
  #board { padding-bottom: 2.25rem; }
}

/* Toolbar */
.toolbar, .controls { display: flex; align-items: center; gap: .75rem 1rem; flex-wrap: wrap; }
.toolbar { justify-content: space-between; padding-block: 1.4rem .4rem; }
#board-title { font-size: clamp(1.6rem, 3.5vw, 2rem); }
.controls label { display: flex; align-items: center; gap: .5rem; font: 600 .95rem var(--display); }
.archive-toggle { display: flex; align-items: center; gap: .45rem; }
.primary {
  background: var(--ink); color: #fff; border-color: var(--ink);
  border-radius: 99px; padding-inline: 1.15rem; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(122, 92, 192, .28);
}
.primary:hover { background: #3b3357; color: #fff; }
#notice:not(:empty) {
  margin-block: .5rem; padding: .6rem .95rem; border-radius: 16px;
  background: var(--mint-soft); color: var(--ink); font-weight: 600;
}
#retry { justify-self: start; margin-bottom: 1rem; }
#board { padding-bottom: 1.75rem; }

/* Groups and cards */
.group { margin-top: 1.5rem; }
.group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .55rem 1rem; }
.group > .group-head { margin-bottom: .65rem; }
.group-head h3, .group > h3, .schedule-main > h3, .crew-waiting h3 { font-size: 1.35rem; }
.group-head button { font-size: .9rem; }
.panel {
  padding: .9rem 1.1rem;
  margin-block: .6rem 1.25rem;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: #fbfafd;
  display: grid;
  gap: .65rem;
}
.panel label { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.panel summary { cursor: pointer; color: var(--plum); font: 600 1rem var(--display); border-radius: 10px; }
.roster-rows { margin-block: .55rem; }
.roster-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem 0; }
.roster-row + .roster-row { border-top: 1px solid var(--line-soft); }
.roster-row p { overflow-wrap: anywhere; font-size: .9rem; }
.roster-row strong { font-family: var(--display); font-weight: 600; }
.empty { padding: .9rem 1.1rem; border: 2px dashed var(--lavender); border-radius: 18px; color: var(--soft); background: #fdfcff; }
.items { display: grid; gap: .65rem; }
.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .65rem 1rem;
  padding: 1rem 1.15rem;
  border-radius: 20px;
  background: #fbfafd;
  border: 1px solid var(--line-soft);
}
.item h4 { margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.item.procedure-card { grid-template-columns: minmax(0, 1fr) auto; }
.item p { margin-top: .25rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.item .meta { font: 500 .75rem/1.5 var(--mono); letter-spacing: .06em; color: var(--soft); }
.item a { display: inline-block; margin-top: .35rem; }
.shift-time { color: var(--moss); font-weight: 800; }
.item-side { display: grid; justify-items: end; gap: .5rem; }
.item-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.item-actions button, .item.procedure-card > button { font-size: .875rem; min-height: 2.5rem; padding-inline: .8rem; }
.status {
  font: 500 .72rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  border-radius: 99px; padding: .25rem .7rem; background: var(--lilac-soft); color: var(--soft);
}
.status[data-status="Tentative"] { background: var(--lilac); color: #4d3787; }
.status[data-status="Confirmed"], .status[data-status="Ready"] { background: var(--mint); color: #2a5a3b; }

/* Dialogs: pillows */
dialog {
  width: min(34rem, 100% - 1.5rem); max-height: 92%;
  background: var(--paper); color: var(--ink);
  border: 0; border-radius: 28px; padding: 1.5rem;
  box-shadow: 0 24px 60px rgba(43, 37, 64, .22), 0 2px 8px rgba(43, 37, 64, .08);
}
dialog::backdrop { background: rgba(43, 37, 64, .38); backdrop-filter: blur(3px); }
dialog h2, dialog h3 { font-size: 1.45rem; }
form, form label { display: grid; gap: .45rem; }
form { gap: .9rem; }
form label { font: 600 .95rem var(--display); }
form label :is(input, select, textarea) { font-family: var(--body); font-weight: 400; }
form input, form select, form textarea { min-width: 0; width: 100%; }
.dialog-head, .dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; justify-content: space-between; }
.dialog-head button { width: 2.75rem; padding: 0; border-radius: 50%; font-size: 1.35rem; line-height: 1; background: var(--lilac-soft); box-shadow: none; }
.dialog-actions { justify-content: flex-end; padding-top: .25rem; }
.dialog-actions button { border-radius: 99px; padding-inline: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.form-row > :only-child { grid-column: 1 / -1; }
.error { color: var(--amber-ink); font-weight: 700; }
.error:empty { display: none; }

/* Schedule timeline (bar positions come from inline left/width percentages set in schedule.js) */
.schedule-view .toolbar { padding-block: 1.2rem .3rem; }
.schedule-view #roster { padding: .6rem 1rem; margin-block: .35rem .8rem; }
.schedule-date { margin-top: .2rem; font: 500 .8rem/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--moss); }
.schedule-main { display: grid; gap: .25rem; }
.timeline-section {
  margin-top: .75rem;
  margin-bottom: .75rem;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: #fbfafd;
  padding: 1rem;
}
.timeline-section > h3 { margin-bottom: .5rem; font-size: 1.2rem; }
.timeline-scroll { overflow-x: auto; padding: .25rem .15rem; border-radius: 14px; }
.timeline-axis, .shift-summary, .empty-team-track { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .5rem; }
.timeline-labels { position: relative; height: 1.6rem; color: var(--soft); font: 500 .75rem/1.6rem var(--mono); letter-spacing: .04em; }
.timeline-labels span { position: absolute; white-space: nowrap; transform: translateX(-50%); }
.timeline-labels .axis-first { transform: none; }
.timeline-labels .axis-last { transform: translateX(-100%); }
.team-lane + .team-lane { margin-top: .6rem; }
.team-lane-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-block: .45rem .25rem; border-top: 1px solid var(--line); }
.team-lane-head h4 { margin: 0; font-size: 1.05rem; }
.team-lane-head button, .team-editor button { min-height: 2.25rem; padding: .2rem .75rem; font-size: .85rem; border-radius: 99px; }
.team-lane > .item { margin-block: .35rem; background: var(--paper); }
.empty-team-track { position: relative; padding-bottom: .2rem; align-items: center; }
.empty-team-track .timeline-track { grid-column: 2; }
.empty-team-track > .muted { position: relative; grid-column: 2; padding-left: .7rem; font-size: .85rem; }
.empty-team-track > * { grid-row: 1; }
.team-editor { display: grid; gap: .45rem; padding: .75rem; margin: .4rem 0; border: 2px dashed var(--lavender); border-radius: 18px; background: var(--paper); }
.team-editor > button { justify-self: start; }
.team-edit-row { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .65rem; font-size: .9rem; }
.team-edit-row strong { font-family: var(--display); font-weight: 600; }
.team-edit-row > button { margin-left: auto; }
.timeline-shift { margin: .25rem 0; }
.shift-summary { align-items: center; list-style: none; cursor: pointer; border-radius: 12px; }
.shift-summary::-webkit-details-marker { display: none; }
.shift-summary:hover .timeline-track { background: #e9e3f6; }
.timeline-name { font-size: .875rem; font-weight: 600; color: var(--soft); overflow-wrap: anywhere; }
.mobile-shift-name { display: none; }
.timeline-track { display: block; position: relative; height: 2rem; background: #f1eef8; border-radius: 12px; }
.track-mark { position: absolute; inset-block: 0; width: 1px; background: #e0d8ef; }
.track-mark:first-child { display: none; }
.shift-bar {
  display: block;
  position: absolute;
  inset-block: .14rem;
  background: linear-gradient(90deg, var(--mint), #dcd0f5);
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 600 .85rem/1.55rem var(--display);
  text-indent: .45rem;
  box-shadow: 0 2px 6px rgba(90, 70, 140, .12);
}
.shift-bar[data-status="Tentative"] { color: #4d3787; background: var(--paper); border: 1px dashed var(--plum); box-shadow: none; }
.shift-bar.crew-confirmed { color: var(--ink); background: linear-gradient(90deg, var(--sage), var(--lavender)); border-style: solid; border-color: transparent; }
.shift-bar.my-shift { box-shadow: inset 0 0 0 2px var(--moss); }
.shift-point {
  position: absolute;
  top: 50%;
  width: .75rem;
  height: .75rem;
  transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 3px;
  background: var(--plum);
}
.timeline-detail { margin: .4rem 0 .6rem; background: var(--paper); }
.crew-waiting { margin-top: 1.25rem; }
.crew-waiting ul { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: .55rem 0 0; list-style: none; }
.crew-waiting li {
  padding: .35rem .8rem; border-radius: 12px; background: var(--paper); border: 2px dashed var(--lavender);
  font: 600 .85rem var(--display); color: var(--ink);
}

@media (max-width: 40rem) {
  .wrap { width: calc(100% - 1.25rem); }
  .top { padding-block: .75rem; }
  .brand { font-size: 1.15rem; }
  .brand img { width: 2.5rem; height: 2.5rem; }
  .public-link, #sign-out { min-height: 2.5rem; padding-inline: .85rem; font-size: .875rem; }
  #access { order: 1; }
  main.wrap { border-radius: 22px; }
  .tabs { gap: .3rem; }
  .tabs button { min-height: 44px; padding-inline: .7rem; }
  .timeline-section { padding: .7rem; }
  .shift-summary { min-height: 44px; }
  .timeline-axis, .shift-summary, .empty-team-track { grid-template-columns: minmax(3.75rem, 25%) minmax(0, 1fr); }
  .timeline-labels :nth-child(even):not(:last-child) { display: none; }
  .timeline-labels :nth-last-child(2):nth-child(odd):not(:first-child) { display: none; }
  .timeline-labels span { font-size: .7rem; }
  .mobile-shift-name { display: inline; }
  .shift-bar { font-size: 0; }
  .item { grid-template-columns: 1fr; padding: .9rem 1rem; }
  .item-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .form-row { grid-template-columns: 1fr; }
  dialog { padding: 1.15rem; border-radius: 24px; }
}

/* Join / sign-in page */
.join-page { display: grid; place-items: center; padding: 1.5rem 0; }
.join-card {
  width: min(100% - 2rem, 28rem);
  display: grid; justify-items: center; gap: .7rem;
  padding: clamp(1.5rem, 6vw, 2.5rem);
  text-align: center;
  background: var(--paper);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.join-logo {
  width: 5.5rem; height: 5.5rem; padding: .7rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), var(--lilac));
}
.join-card h1 { font-size: clamp(1.7rem, 7vw, 2.2rem); line-height: 1.1; }
#sign-in-status { color: var(--soft); max-width: 22rem; }
#sign-in-retry { margin-top: .25rem; border-radius: 99px; padding-inline: 1.2rem; }
#join-form { width: 100%; margin-top: .4rem; text-align: left; }
#join-form .primary { width: 100%; }
.join-home { margin-top: .5rem; font-size: .95rem; }

/* Bar / Decor / Elves crew lists in the plush look. Tokens come from styles.css :root. */
#bar-page {
  --bar-panel: #fbfafd;
  --bar-line: var(--line-soft);
  --bar-text: var(--ink);
  --bar-muted: var(--soft);
  --bar-accent: var(--plum);
  color: var(--bar-text);
}
#bar-page * { box-sizing: border-box; }
#bar-page :where(h2, h3, h4, p) { margin: 0; }
#bar-page h3 { font-size: 1.35rem; }
#bar-page .bar-title { font-size: 1.5rem; }
#bar-page .bar-group { margin-top: 1.5rem; }
#bar-page .bar-head, #bar-page .bar-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .55rem 1rem;
}
#bar-page .bar-head { margin-bottom: .65rem; }
#bar-page button, #bar-page input, #bar-page textarea { min-height: 44px; }
#bar-page button { font-size: .875rem; }
#bar-page .bar-head button { border-radius: 99px; padding-inline: 1rem; }
#bar-page .bar-shopping {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; gap: 1.25rem;
  margin-top: 1.5rem;
}
#bar-page .bar-shopping > section { min-width: 0; }
#bar-page .bar-shopping .bar-head { min-height: 44px; }
#bar-page :is(.bar-shopping, .crew-tasks) ul {
  list-style: none; padding: .25rem 0; margin: 0; background: var(--bar-panel);
  border: 1px solid var(--bar-line); border-radius: 20px;
}
#bar-page :is(.bar-shopping, .crew-tasks) ul:empty { display: none; }
#bar-page :is(.bar-shopping, .crew-tasks) li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: center;
  padding: .45rem .9rem; overflow-wrap: anywhere;
}
#bar-page :is(.bar-shopping, .crew-tasks) li + li { border-top: 1px solid var(--bar-line); }
#bar-page .bar-shopping .bar-shopping-row { display: flex; flex-wrap: wrap; justify-content: space-between; }
#bar-page .bar-shopping-row > :first-child { flex: 1 1 7rem; min-width: 0; }
#bar-page .bar-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }

/* Store toggles look like shift chips */
#bar-page .bar-shopping li button[data-store] {
  min-height: 2.25rem; padding: .25rem .7rem; border-radius: 12px;
  background: #f1eef8; color: var(--ink); box-shadow: none; font-size: .8rem;
}
#bar-page .bar-shopping li button[data-store]:hover { background: var(--lilac); transform: none; }
#bar-page .bar-shopping button[aria-pressed="true"] { background: var(--mint); color: #24503a; }
#bar-page .bar-shopping button[aria-pressed="true"]::before { content: "✓ "; }
#bar-page .bar-stores li button[data-store] { background: var(--paper); border: 2px dashed var(--lavender); }
@media (pointer: coarse) {
  #bar-page .bar-shopping li button[data-store] { min-height: 44px; }
}
#bar-page button.bar-delete {
  min-height: 32px; min-width: 32px; padding: 0; border-radius: 50%;
  font-size: 1.1rem; line-height: 1; background: transparent; color: var(--bar-muted); box-shadow: none;
}
#bar-page button.bar-delete:hover { background: var(--lilac-soft); color: var(--bar-text); transform: none; }
@media (pointer: coarse) {
  #bar-page button.bar-delete { min-height: 44px; min-width: 44px; }
}
#bar-page .bar-shopping .bar-description { margin-top: .1rem; font-size: .85rem; }
#bar-page .bar-store-empty {
  color: var(--bar-muted); font-size: .9rem; padding: .7rem .95rem;
  border: 2px dashed var(--lavender); border-radius: 16px; background: #fdfcff;
}
#bar-page .bar-stores { min-width: 0; }
#bar-page .bar-stores section + section { margin-top: 1.25rem; }
#bar-page .bar-stores-jump { display: none; }
@media (max-width: 575px) {
  #bar-page .bar-shopping { grid-template-columns: 1fr; }
  #bar-page .bar-stores-jump { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Drinks table */
#bar-page .bar-table-wrap {
  overflow-x: auto; border: 1px solid var(--bar-line); border-radius: 20px; background: var(--bar-panel);
}
#bar-page table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .9rem; }
#bar-page th, #bar-page td {
  padding: .6rem clamp(.4rem, 1.5vw, .9rem); text-align: left; vertical-align: top; overflow-wrap: anywhere;
}
#bar-page thead th {
  font: 500 .7rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--bar-muted);
  background: var(--lilac-soft); padding-block: .7rem;
}
#bar-page tbody th { font-family: var(--display); font-weight: 600; }
#bar-page tr + tr, #bar-page tbody { border-top: 1px solid var(--bar-line); }
#bar-page thead th:first-child { width: 35%; }
#bar-page thead th:nth-child(2) { width: 25%; }
#bar-page .bar-price { text-align: right; font-variant-numeric: tabular-nums; }
#bar-page td.bar-price { font-weight: 700; }
#bar-page .bar-drink-name {
  min-height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; box-shadow: none;
  text-align: left; color: var(--bar-accent); text-decoration: underline; text-underline-offset: .18em;
  font-size: .95rem;
}
#bar-page .bar-drink-name:hover { color: var(--ink); transform: none; }
#bar-page .bar-description { color: var(--bar-muted); font-weight: 400; font-family: var(--body); white-space: pre-wrap; }

/* Drink dialog: same pillow as the main dialogs */
#bar-page dialog { width: min(34rem, 100% - 1.5rem); max-height: 92%; }
#bar-page form, #bar-page label { display: grid; gap: .45rem; }
#bar-page label.crew-check { display: flex; align-items: center; gap: .65rem; min-height: 2.5rem; cursor: pointer; font: inherit; }
#bar-page .crew-check input { min-height: 0; }
#bar-page .crew-check > div { font-weight: 600; }
#bar-page .crew-check input:checked + div { color: var(--bar-muted); text-decoration: line-through; text-decoration-color: var(--sage); text-decoration-thickness: 2px; }
#bar-page form { gap: .9rem; }
#bar-page .bar-add-supply {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end; gap: .6rem; margin-bottom: .8rem;
  padding: .9rem; border-radius: 20px; background: var(--mint-soft);
}
#bar-page .bar-add-supply label:first-child { grid-column: 1 / -1; }
#bar-page .bar-add-supply input { width: 100%; min-width: 0; }
#bar-page .bar-add-status {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}
#bar-page .bar-drink-fields {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem;
  min-width: 0; margin: 0; padding: 0; border: 0;
}
#bar-page .bar-drink-fields label:first-child { grid-column: 1 / -1; }
#bar-page .bar-drink-fields input { width: 100%; min-width: 0; }
#bar-page textarea { resize: vertical; min-height: 5rem; }
#bar-page .bar-actions { justify-content: flex-end; }
#bar-page .bar-actions button { border-radius: 99px; padding-inline: 1.1rem; }
#bar-page .bar-save {
  background: var(--ink); border-color: var(--ink); color: #fff; border-radius: 99px;
  box-shadow: 0 6px 18px rgba(122, 92, 192, .28);
}
#bar-page .bar-save:hover { background: #3b3357; }
@media (max-width: 575px) {
  #bar-page .bar-add-supply { grid-template-columns: minmax(0, 1fr); }
  #bar-page thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #bar-page tbody { border-top: 0; }
  #bar-page tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #bar-page tbody th { grid-column: 1 / -1; padding-bottom: 0; }
  #bar-page tbody td { text-align: left; }
  #bar-page tbody td::before {
    content: attr(data-label); display: block;
    font: 500 .65rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--bar-muted);
  }
}
