:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --text: #172033;
  --muted: #68758a;
  --line: #dce3ed;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 20;
  width: 0;
  height: 3px;
  background: var(--primary);
}

.app-shell {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 0 14px 96px;
}

.hero {
  height: 150px;
  margin: 0 0 16px;
  overflow: hidden;
  border-radius: 0 0 22px 22px;
}

.hero img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.notice-strip,
.banner,
.quick-links,
.schedule {
  margin: 14px 0;
}

.notice-strip,
.schedule {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgb(15 23 42 / 7%);
}

.notice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.notice-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.notice-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.notice-item {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #e4eaf3;
  border-radius: 10px;
  background: #fbfcff;
  color: inherit;
  text-align: left;
  font: inherit;
}

.notice-item.is-important {
  border-color: #fecaca;
  background: #fff6f6;
}

.notice-item.is-urgent {
  border-color: #fca5a5;
  background: #fff1f2;
}

.notice-item strong {
  font-size: 15px;
}

.notice-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.notice-modal {
  width: min(100%, 520px);
  max-height: min(86vh, 720px);
  overflow: auto;
  padding: 18px;
  border-radius: 18px 18px 10px 10px;
  background: var(--surface);
}

.notice-modal-body {
  margin: 18px 0 0;
  color: #344054;
  line-height: 1.65;
  white-space: pre-wrap;
}

.notice-modal-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 16px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.notice-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 800;
}

.banner {
  padding: 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1d4ed8, #0f766e 58%, #ca8a04);
  color: #fff;
}

.banner p,
.banner h1 {
  margin: 0;
}

.banner h1 {
  margin-top: 8px;
  font-size: 24px;
  letter-spacing: 0;
}

.banner span {
  display: block;
  margin-top: 10px;
  color: rgb(255 255 255 / 82%);
}

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

.quick-links a {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

.quick-links span {
  display: block;
  font-weight: 700;
}

.quick-links small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

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

.section-title h2 {
  margin: 0;
  font-size: 18px;
}

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

.schedule-item {
  width: 100%;
  padding: 13px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

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

.schedule-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}

.notify-fab {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 15;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 28px rgb(37 99 235 / 35%);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgb(15 23 42 / 42%);
}

.notify-modal {
  width: min(100%, 520px);
  max-height: min(86vh, 720px);
  overflow: auto;
  padding: 18px;
  border-radius: 18px 18px 10px 10px;
  background: var(--surface);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.modal-head p,
.modal-head h2 {
  margin: 0;
}

.modal-head p {
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
}

.modal-head h2 {
  margin-top: 4px;
  font-size: 22px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 24px;
}

.browser-guide {
  margin: 16px 0;
  padding: 13px;
  border-radius: 10px;
  background: #eef6ff;
  color: #21415f;
  line-height: 1.45;
}

.install-button,
.primary-button,
.secondary-button,
.danger-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  font-weight: 800;
}

.install-button {
  margin-bottom: 14px;
  background: #111827;
  color: #fff;
}

.group-box {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.group-box legend {
  padding: 0 6px;
  font-weight: 800;
}

.group-list {
  display: grid;
  gap: 8px;
}

.group-list label,
.consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.45;
}

.consent {
  margin: 15px 0;
}

.modal-actions {
  display: grid;
  gap: 9px;
}

.primary-button {
  background: var(--primary);
  color: #fff;
}

.primary-button:disabled {
  background: #a7b4c8;
}

.secondary-button {
  background: #e8f0ff;
  color: var(--primary-dark);
}

.danger-button {
  background: #fee2e2;
  color: var(--danger);
}

.status-text {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
