:root {
  color-scheme: light;
  --bg: #fff6f9;
  --ink: #24181d;
  --muted: #7b6870;
  --line: #f0dbe3;
  --panel: #ffffff;
  --teal: #246d73;
  --teal-2: #0f7777;
  --coral: #d85f83;
  --gold: #e3a83f;
  --lavender: #f0d9ff;
  --pink: #f6a8c2;
  --shadow: 0 16px 38px rgba(82, 36, 54, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-screen.hidden,
.locked {
  display: none;
}

.login-card {
  width: min(100%, 420px);
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-visual {
  position: relative;
  min-height: 142px;
  margin: -10px -10px 2px;
  border-radius: 8px;
  overflow: hidden;
  background: #ffe8f0;
}

.clinic-photo {
  width: 100%;
  height: 142px;
  object-fit: cover;
  display: block;
}

.login-mascot {
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 999px;
  border: 4px solid #ffe1ec;
  background: white;
}

.login-card h1 {
  margin-bottom: 4px;
}

.login-card label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.login-copy {
  color: var(--muted);
}

.login-note {
  color: var(--muted);
  font-size: 12px;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: min(100%, 780px);
  margin: 0 auto;
  padding: env(safe-area-inset-top) 14px 92px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 12px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px);
}

.top-actions {
  display: flex;
  gap: 8px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-row img {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #ffe1ec;
}

.eyebrow,
.muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  letter-spacing: 0;
}

.panel {
  margin: 12px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #ffe8f0 54%, #e9f7f5 100%);
  overflow: hidden;
}

.hero-panel > div,
.status-badge {
  position: relative;
  z-index: 1;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.13;
}

.hero-panel h2 {
  margin-top: 6px;
  font-size: 30px;
}

.status-line {
  margin-top: 4px;
  color: var(--muted);
}

.staff-select-label {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

select {
  width: min(100%, 280px);
  min-height: 42px;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

.status-badge {
  min-width: 82px;
  padding: 9px 10px;
  border-radius: 999px;
  background: #edf0ea;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.status-badge.ok {
  background: #dff3e6;
  color: #17633a;
}

.status-badge.warn {
  background: #fff1d8;
  color: #8a5300;
}

.status-badge.bad {
  background: #ffe6e1;
  color: #9d301f;
}

.icon-button,
.text-button,
.primary-button,
.request-buttons button,
.clock-button,
.proof-card {
  border: 0;
  cursor: pointer;
}

.icon-button {
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  font-weight: 800;
}

.clock-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.clock-button {
  min-height: 96px;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  text-align: left;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.clock-button.recommended {
  outline: 4px solid rgba(227, 168, 63, 0.42);
  box-shadow: 0 0 0 2px #e3a83f inset, 0 12px 26px rgba(227, 168, 63, 0.25);
}

.clock-button span {
  font-size: 24px;
  font-weight: 800;
}

.clock-button.end {
  background: var(--coral);
}

.clock-button.sub {
  min-height: 54px;
  background: #e9efe9;
  color: var(--ink);
  font-weight: 800;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
}

.section-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.timecard-panel {
  padding: 14px;
}

.timecard-meta {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 8px;
  margin-bottom: 8px;
  color: #3b93ab;
  font-size: 13px;
}

.timecard-meta strong {
  color: var(--ink);
  font-size: 15px;
}

.timecard-scroll {
  overflow-x: auto;
  border: 1px solid #9bd5df;
  border-radius: 6px;
  background: #fff;
}

.timecard-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.timecard-table th,
.timecard-table td {
  height: 30px;
  border: 1px solid #9bd5df;
  padding: 3px 4px;
  text-align: center;
  vertical-align: middle;
  line-height: 1.15;
}

.timecard-table th {
  background: #e7f8fb;
  color: #236f88;
  font-weight: 800;
}

.timecard-table td:first-child,
.timecard-table th:first-child {
  width: 34px;
  color: #2583a0;
  font-weight: 800;
}

.timecard-table .comment-col {
  width: 126px;
  white-space: normal;
  word-break: break-word;
  text-align: left;
  font-size: 11px;
  line-height: 1.25;
}

.timecard-table th.comment-col {
  text-align: center;
}

.timecard-table .today-row td {
  background: #fff36f;
}

.reminder-banner {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff1d8;
  color: #8a5300;
  font-weight: 800;
  line-height: 1.45;
}

details.panel {
  padding: 0;
  overflow: hidden;
}

details.panel summary {
  min-height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

details.panel summary::-webkit-details-marker {
  display: none;
}

details.panel summary::after {
  content: "開く";
  min-width: 44px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #e7efed;
  color: var(--teal);
  font-size: 12px;
  text-align: center;
}

details.panel[open] summary::after {
  content: "閉じる";
}

details.panel summary strong {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

.collapsible-content {
  padding: 0 16px 16px;
}

.collapsible-content > .section-title:first-child {
  margin-top: 2px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 16px 16px;
}

.summary-grid div {
  padding: 12px;
  border-radius: 8px;
  background: #f3f5f2;
}

.summary-grid span,
.summary-grid strong {
  display: block;
}

.summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.summary-grid strong {
  margin-top: 4px;
  font-size: 22px;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.proof-card {
  min-height: 116px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbf9;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.proof-card small {
  color: var(--muted);
  min-height: 34px;
  display: flex;
  align-items: center;
}

.proof-card.done {
  border-color: #97d0b0;
  background: #edf8f1;
}

.proof-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--teal);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.file-proof input {
  display: none;
}

.map-card {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f3f5f2;
}

.map-card p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  background: #e7efed;
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.text-button.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.history-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: 0 16px;
}

.history-filter .text-button {
  white-space: nowrap;
}

.history-filter .text-button.active {
  background: var(--teal);
  color: #fff;
}

.history-list {
  display: grid;
  gap: 8px;
  margin: 10px 16px 16px;
}

.history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.history-item.clock {
  border-left: 5px solid var(--teal);
}

.history-item.request {
  border-left: 5px solid var(--coral);
}

.history-item strong,
.history-item span {
  display: block;
}

.history-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.history-item em {
  min-width: 58px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #f4f6f4;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.history-actions button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef5f2;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.calendar-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.calendar-header strong {
  text-align: center;
  font-size: 20px;
}

.calendar-message {
  margin: -2px 0 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f4f6f4;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.calendar-message.ok {
  background: #edf8f1;
  color: #17633a;
}

.calendar-message.warn {
  background: #fff1d8;
  color: #8a5300;
  font-weight: 800;
}

.calendar-form {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #fffafd;
  border: 1px solid var(--line);
}

.calendar-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calendar-form-grid,
.calendar-time-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.calendar-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.calendar-quick-actions button {
  min-height: 38px;
  border: 1px solid #dce7e3;
  border-radius: 8px;
  background: #eef5f2;
  color: var(--teal);
  font-weight: 900;
}

.calendar-quick-actions button.active {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.calendar-time-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--ink);
}

.calendar-time-toggle input {
  width: 18px;
  height: 18px;
  padding: 0;
}

.calendar-preview {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #e8bfd3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.calendar-form input:disabled {
  background: #f4f6f4;
  color: #9ca6a0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.weekdays {
  margin-bottom: 1px;
  border-bottom: 0;
}

.weekdays span {
  min-height: 28px;
  display: grid;
  place-items: center;
  background: #f8faf8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.day-cell {
  min-height: 86px;
  background: #fff;
  padding: 7px 4px;
  overflow: hidden;
}

.day-cell.dim {
  background: #f4f6f4;
  color: #9ca6a0;
}

.day-number {
  font-weight: 800;
  margin-bottom: 6px;
}

.event-pill {
  display: block;
  width: 100%;
  margin: 3px 0;
  padding: 3px 5px;
  border: 0;
  border-radius: 999px;
  background: var(--lavender);
  color: #514171;
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.calendar-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.danger-button {
  min-height: 48px;
  border-radius: 8px;
  background: #fff2f0;
  color: #9d301f;
  font-weight: 800;
  border: 1px solid #efbbb3;
}

.event-pill.holiday {
  background: #f2c1ef;
  color: #762579;
}

.event-pill.leave {
  background: #cfe8ff;
  color: #24506e;
}

.event-pill.work {
  background: #dff3e6;
  color: #17633a;
}

.event-pill.other {
  background: #e7efed;
  color: var(--teal);
}

.event-pill.editing {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

.request-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.request-buttons button {
  min-height: 44px;
  border-radius: 8px;
  background: #eef2ec;
  color: var(--ink);
  font-weight: 800;
}

.request-form {
  display: grid;
  gap: 8px;
}

.request-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.request-form select {
  width: 100%;
}

.request-extra {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #f2cbd9;
  border-radius: 8px;
  background: #fff8fb;
}

.request-extra[hidden] {
  display: none;
}

.account-form,
.admin-account-tools {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.account-form label,
.admin-account-tools label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-account-tools {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffafd;
}

.admin-account-tools h3 {
  margin: 0;
  font-size: 16px;
}

.admin-account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.inline-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.form-message {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-message.ok {
  color: #17633a;
  font-weight: 800;
}

.form-message.warn {
  color: #8a5300;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
}

.primary-button {
  min-height: 48px;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  font-weight: 800;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.export-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.export-controls label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.export-controls input {
  width: 132px;
  min-height: 38px;
  padding: 8px 10px;
}

.admin-summary div {
  padding: 12px;
  border-radius: 8px;
  background: #f2f5f2;
}

.admin-summary strong {
  display: block;
  font-size: 22px;
}

.admin-summary span {
  color: var(--muted);
  font-size: 12px;
}

.log-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.log-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.log-item strong {
  display: block;
}

.log-item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.qr-layout {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 14px;
  align-items: center;
}

.qr-layout img {
  width: 148px;
  height: 148px;
  object-fit: contain;
  border: 8px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.qr-print-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.qr-print-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  break-inside: avoid;
}

.qr-print-card img {
  width: 100%;
  max-width: 180px;
  aspect-ratio: 1;
  display: block;
  margin: 0 auto 10px;
  object-fit: contain;
  border: 8px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.qr-print-card strong,
.qr-print-card small {
  display: block;
  text-align: center;
}

.qr-print-card strong {
  font-size: 16px;
}

.qr-print-card small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

code {
  display: inline-block;
  margin-top: 8px;
  padding: 8px;
  border-radius: 6px;
  background: #eef2ec;
  color: var(--teal);
  font-weight: 800;
}

.confirm-card {
  max-width: 440px;
}

.calendar-event-card {
  max-width: 420px;
}

.calendar-event-detail {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.calendar-event-detail div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.calendar-event-detail span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.calendar-event-detail strong {
  text-align: right;
}

.calendar-event-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.2fr;
  gap: 8px;
  margin-top: 14px;
}

.confirm-summary {
  display: grid;
  gap: 8px;
}

.confirm-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.confirm-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.confirm-summary strong {
  text-align: right;
}

.confirm-proof-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.proof-inline-button {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5faf8;
  color: var(--ink);
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.proof-inline-button span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.proof-inline-button strong {
  font-size: 13px;
  line-height: 1.25;
}

.proof-inline-button.done {
  border-color: #97d0b0;
  background: #edf8f1;
}

.clock-exception-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8fb;
}

.clock-exception-panel p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.clock-exception-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  font-weight: 800;
}

.clock-exception-panel input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.clock-exception-panel textarea {
  width: 100%;
  min-height: 54px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}

.confirm-warning {
  min-height: 20px;
  margin: 12px 0;
  color: #9d301f;
  font-weight: 800;
  line-height: 1.5;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 8px;
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 6;
  transform: translateX(-50%);
  width: min(calc(100% - 28px), 520px);
  min-height: 62px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 6px;
  border: 1px solid rgba(219, 227, 220, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
}

.bottom-nav a {
  display: grid;
  place-items: center;
  min-height: 48px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
}

.bottom-nav a.active {
  background: var(--teal);
  color: #fff;
}

dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  width: min(calc(100% - 28px), 460px);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(8, 18, 16, 0.42);
}

.dialog-card {
  padding: 16px;
}

#qrReader {
  width: 100%;
  min-height: 280px;
  overflow: hidden;
  border-radius: 8px;
  background: #0e1715;
}

#qrReader video {
  border-radius: 8px;
}

#qrReader__scan_region {
  background: #0e1715;
}

#qrReader__dashboard_section_csr button,
#qrReader__dashboard_section_swaplink {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

#qrReader__status_span {
  color: #fff;
}

.qr-reader-message {
  min-height: 280px;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #fff;
  text-align: center;
  font-weight: 800;
}

#qrDialogText {
  margin: 10px 0;
  color: var(--muted);
}

.manual-qr-panel {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf9;
}

.manual-qr-panel summary {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.manual-qr-panel input {
  margin-top: 10px;
}

.manual-qr-panel .primary-button {
  margin-top: 8px;
}

@media (max-width: 520px) {
  .app-shell {
    padding-inline: 10px;
  }

  .proof-grid,
  .admin-summary,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .qr-layout {
    grid-template-columns: 1fr;
  }

  .qr-print-grid {
    grid-template-columns: 1fr;
  }

  .calendar-form-grid,
  .calendar-time-fields,
  .admin-account-grid,
  .inline-actions {
    grid-template-columns: 1fr;
  }

  .calendar-quick-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .day-cell {
    min-height: 74px;
    padding: 6px 3px;
  }

  .event-pill {
    font-size: 10px;
    padding-inline: 4px;
  }
}

@media print {
  body {
    background: #fff;
  }

  body * {
    visibility: hidden;
  }

  .qr-print-panel,
  .qr-print-panel * {
    visibility: visible;
  }

  .qr-print-panel {
    position: fixed;
    inset: 24px;
    box-shadow: none;
    border: 2px solid #111;
  }

  .bottom-nav,
  .topbar {
    display: none;
  }
}
