/* ============================================================
   Unterrichtsassistent  v3
   helles Design, kompakte Kacheln, große Touchflächen
   ============================================================ */

:root {
  --bg:        #f1f4f9;
  --bg-soft:   #e6ebf3;
  --surface:   #ffffff;
  --surface-2: #f7f9fc;
  --text:      #1c2433;
  --muted:     #6b7384;
  --line:      #dbe1ec;
  --line-soft: #e8edf4;
  --accent:    #2a6cb0;
  --accent-soft:#dbeafd;
  --warn:      #c47a1b;
  --warn-bg:   #fff2d8;
  --danger:    #c2533f;
  --success:   #2f8b57;

  --radius:    14px;
  --radius-lg: 20px;
  --tap:       52px;
  --header-h:  60px;

  --shadow-1: 0 1px 2px rgba(20,30,55,.05), 0 1px 6px rgba(20,30,55,.04);
  --shadow-2: 0 8px 24px rgba(20,30,55,.10);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior-y: none;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
body.no-tabbar { padding-bottom: env(safe-area-inset-bottom); }
body.in-detail .app-header { display: none; }
body.in-detail { padding-bottom: env(safe-area-inset-bottom); }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
svg { display: block; }

/* ============================================================
   Header  groß, leicht zu treffen
   ============================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  padding: env(safe-area-inset-top) 6px 0;
  display: grid;
  grid-template-columns: var(--tap) 1fr var(--tap) var(--tap);
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-btn {
  width: var(--tap);
  height: var(--tap);
  border: 0;
  background: transparent;
  border-radius: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
}
.header-btn:active { background: var(--bg-soft); }
.header-btn svg { width: 26px; height: 26px; }
.header-title {
  text-align: center;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.kw {
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}
.range {
  font-size: 16px;
  font-weight: 800;
  margin-top: 1px;
}

/* ============================================================
   Views
   ============================================================ */
.view { display: none; padding-bottom: 24px; }
.view.active { display: block; }

/* ============================================================
   Dashboard  Tagesstreifen
   ============================================================ */
.day-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 6px 6px 6px;
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: var(--header-h);
  z-index: 20;
}
.day-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 2px 6px;
  border-radius: 10px;
  background: transparent;
  position: relative;
}
.day-cell.today { background: var(--accent-soft); }
.day-cell.holiday { background: var(--warn-bg); }
.day-cell-name {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.day-cell.today .day-cell-name { color: var(--accent); }
.day-cell.holiday .day-cell-name { color: var(--warn); }
.day-cell-date {
  font-size: 17px;
  font-weight: 800;
  margin-top: 1px;
}
.day-cell.holiday .day-cell-date { color: var(--warn); }
.day-cell-note {
  margin-top: 4px;
  width: 100%;
  font-size: 10.5px;
  padding: 4px 2px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  text-align: center;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.day-cell-note.has-note {
  background: var(--warn);
  border-color: var(--warn);
  color: #fff;
}
.day-cell.holiday .day-cell-note { display: none; }
.day-cell-holiday-label {
  font-size: 9.5px;
  color: var(--warn);
  font-weight: 700;
  text-align: center;
  margin-top: 4px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  line-height: 1.1;
  width: 100%;
  overflow: hidden;
}

/* ============================================================
   Grid  Stundenkacheln, kompakt mit 3 Zeilen
   ============================================================ */
.grid-wrap {
  padding: 4px 4px 8px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.tile {
  position: relative;
  min-height: 62px;
  border-radius: 11px;
  background: var(--tile-bg, #5f6b80);
  color: #fff;
  padding: 6px 6px 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border: 0;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.08s ease;
  box-shadow: var(--shadow-1);
  line-height: 1.15;
  gap: 1px;
}
.tile:active { transform: scale(0.96); }
.tile-line1 {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.1;
}
.tile-line2 {
  font-weight: 700;
  font-size: 13px;
  opacity: 0.97;
  line-height: 1.1;
}
.tile-room {
  font-size: 11.5px;
  opacity: 0.88;
  font-weight: 600;
  margin-top: 1px;
}
.tile.has-content::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}
.tile.current {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
  box-shadow: var(--shadow-2);
}
.tile.duty {
  background: var(--tile-bg, #9aa3b2) !important;
}
.tile-empty {
  min-height: 62px;
  border-radius: 11px;
  background: transparent;
  border: 1px solid var(--line-soft);
}
.tile-holiday {
  min-height: 62px;
  border-radius: 11px;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(196,122,27,0.10),
      rgba(196,122,27,0.10) 8px,
      transparent 8px,
      transparent 16px
    ),
    var(--warn-bg);
  border: 1px solid rgba(196,122,27,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warn);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  padding: 4px;
  line-height: 1.15;
}

/* ============================================================
   Tab-Bar unten
   ============================================================ */
.tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(20,30,55,.05);
}
.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: transparent;
  height: 60px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.tab-btn svg { width: 22px; height: 22px; }
.tab-btn.active { color: var(--accent); }
.tab-btn:active { background: var(--bg-soft); }
body.no-tabbar .tab-bar { display: none; }
body.in-detail .tab-bar { display: none; }

/* ============================================================
   Detailansicht  kompakt, readonly als Default
   ============================================================ */
.detail-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: var(--tap) 1fr var(--tap);
  align-items: center;
  gap: 6px;
  padding: env(safe-area-inset-top) 8px 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.back-btn, .edit-toggle {
  width: var(--tap);
  height: var(--tap);
  border: 0;
  background: transparent;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.back-btn:active, .edit-toggle:active { background: var(--bg-soft); }
.back-btn svg { width: 24px; height: 24px; }
.edit-toggle svg { width: 22px; height: 22px; }
.edit-toggle.active {
  background: var(--accent);
  color: white;
}
.detail-title-wrap { min-width: 0; padding: 4px 2px; }
.detail-date {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.detail-title {
  margin: 1px 0 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-body { padding: 10px 12px 40px; }

/* Readonly Stack  kompaktere Darstellung */
.read-block {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-1);
}
.read-block-label {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 4px;
}
.read-block-value {
  font-size: 14.5px;
  white-space: pre-wrap;
  word-break: break-word;
}
.read-block-value.empty {
  color: var(--muted);
  font-style: italic;
  font-size: 13px;
}

/* Phase im Readonly  kompakt */
.phase-r {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 9px 12px;
  margin-bottom: 6px;
  box-shadow: var(--shadow-1);
}
.phase-r-head {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 2px;
}
.phase-r-time {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.phase-r-clock {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg-soft);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.phase-r-name {
  font-size: 14px;
  font-weight: 800;
  flex: 1;
  min-width: 0;
}
.phase-r-content {
  font-size: 14px;
  margin: 3px 0 0;
  white-space: pre-wrap;
  color: var(--text);
}
.phase-r-note {
  margin-top: 5px;
  background: var(--warn-bg);
  border-left: 3px solid var(--warn);
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 13px;
  color: #6f4811;
}

/* Edit-Felder */
.section-edit {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 11px 13px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-1);
}
.section-edit h3 {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
  margin: 0 0 6px;
}
.section-edit input[type="text"],
.section-edit textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
}
.section-edit textarea { min-height: 70px; resize: vertical; }
.section-edit input:focus, .section-edit textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
  outline: 2px solid var(--accent-soft);
  outline-offset: -1px;
}

/* Phasen-Bearbeitung */
.phase-edit {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  margin-bottom: 6px;
  display: grid;
  gap: 5px;
}
.phase-edit-row { display: grid; grid-template-columns: 70px 1fr; gap: 5px; }
.phase-edit input, .phase-edit textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 14px;
}
.phase-edit textarea { min-height: 50px; }
.phase-actions {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-top: 4px;
}
.phase-actions button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}
.phase-actions button.danger { color: var(--danger); border-color: rgba(194,83,63,0.35); }

.add-phase-btn {
  width: 100%;
  background: var(--surface);
  border: 1px dashed var(--accent);
  color: var(--accent);
  border-radius: var(--radius);
  padding: 10px;
  font-weight: 700;
  font-size: 14px;
}

/* Anhänge */
.attachments-list {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}
.att-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  text-decoration: none;
  color: inherit;
}
.att-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
}
.att-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.att-info { min-width: 0; }
.att-name {
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.att-meta {
  font-size: 11.5px;
  color: var(--muted);
}
.att-del {
  background: transparent;
  border: 0;
  color: var(--danger);
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 8px;
}
.att-del:active { background: rgba(194,83,63,0.1); }
.att-upload-btn {
  display: block;
  width: 100%;
  background: var(--surface);
  border: 1px dashed var(--accent);
  color: var(--accent);
  border-radius: var(--radius);
  padding: 10px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
}

/* Action-Reihe unten */
.action-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.btn-primary {
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  height: 46px;
}
.btn-primary:active { transform: translateY(1px); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  height: 46px;
}
.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(194,83,63,0.4);
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  height: 46px;
}

/* ============================================================
   Bottom Sheets
   ============================================================ */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,15,25,0.45);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  box-shadow: var(--shadow-2);
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  transform: translateY(101%);
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
  max-height: 88vh;
  overflow-y: auto;
  visibility: hidden;
  pointer-events: none;
}
.sheet.open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.25s ease, visibility 0s linear 0s;
}
.sheet h2 {
  margin: 8px 0 14px;
  font-size: 17px;
  font-weight: 800;
}
.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: var(--line);
  margin: 6px auto 4px;
}
.sheet-tall { max-height: 92vh; }
.sheet textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  margin-bottom: 10px;
}
.sheet input[type="file"] {
  margin-bottom: 12px;
  display: block;
  width: 100%;
}
.sheet-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.sheet-actions .btn-primary, .sheet-actions .btn-secondary { flex: 1; }

.menu-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  border: 0;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  font-weight: 700;
}
.menu-item:active { background: var(--bg-soft); }
.menu-item .menu-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}

.hol-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 6px;
  margin-bottom: 12px;
}
.hol-form input {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.hol-form .btn-primary { padding: 0 16px; height: 42px; }
.hol-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.hol-list .rm {
  border: 0;
  background: transparent;
  color: var(--danger);
  padding: 4px 8px;
  font-weight: 700;
}

.hint { color: var(--muted); font-size: 13px; }

/* ============================================================
   Tab-Views: Stunden, Kurse, Einstellungen
   ============================================================ */
.tab-header {
  padding: 16px 16px 6px;
}
.tab-header h1 { font-size: 22px; font-weight: 800; margin: 0; }
.tab-header .tab-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

.lessons-list {
  padding: 6px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lessons-day-head {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 4px 4px;
}
.lessons-day-head.today-head { color: var(--accent); }
.lessons-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow-1);
  text-align: left;
  width: 100%;
  border-left: 5px solid var(--accent);
}
.lessons-row.lessons-row-next {
  border-color: var(--accent);
  outline: 2px solid var(--accent-soft);
  outline-offset: -2px;
}
.lessons-row.lessons-row-virtual {
  background: var(--surface-2);
  border-left-color: var(--line);
  color: var(--muted);
}
.lessons-row-period {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.lessons-row-period .p { font-weight: 800; font-size: 16px; }
.lessons-row-period .t { font-size: 11px; color: var(--muted); }
.lessons-row-main { min-width: 0; }
.lessons-row-course {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 1px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.lessons-row-title {
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lessons-row-title.empty {
  color: var(--muted);
  font-weight: 500;
  font-style: italic;
}
.lessons-row-meta { font-size: 12px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lessons-row-room {
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

.courses-list {
  padding: 6px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.courses-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px 12px;
  width: 100%;
  text-align: left;
  box-shadow: var(--shadow-1);
}
.courses-color {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11.5px;
  line-height: 1.1;
  padding: 2px;
  text-align: center;
}
.courses-info { min-width: 0; }
.courses-name { font-size: 16px; font-weight: 800; }
.courses-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.courses-count { font-size: 12px; color: var(--muted); font-weight: 700; }

.settings-list {
  padding: 8px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.settings-item {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-1);
}
.settings-item:active { background: var(--bg-soft); }
.settings-label { font-weight: 700; font-size: 15px; }
.settings-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.form-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-grid input, .form-grid select {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.manage-list {
  max-height: 50vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
}
.manage-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
}
.manage-row .info {
  min-width: 0;
}
.manage-row .info .a { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manage-row .info .b { font-size: 12px; color: var(--muted); }
.manage-row .del {
  background: transparent;
  border: 1px solid rgba(194,83,63,0.35);
  color: var(--danger);
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 12.5px;
}

.homework-due-banner {
  background: #fff7e0;
  border: 1px solid #f1d28a;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.homework-due-banner .lbl {
  font-size: 11px;
  font-weight: 800;
  color: var(--warn);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.homework-due-banner .src { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ============================================================
   Desktop  komfortabler
   ============================================================ */
@media (min-width: 760px) {
  body { font-size: 16px; }
  .grid-wrap { padding: 14px 24px; }
  .grid { gap: 8px; }
  .tile { min-height: 92px; padding: 10px 12px; }
  .tile-line1 { font-size: 17px; }
  .tile-line2 { font-size: 14px; }
  .tile-room { font-size: 13px; }
  .day-strip { padding: 12px 24px 10px; gap: 8px; }
  .day-cell-name { font-size: 12px; }
  .day-cell-date { font-size: 20px; }
  .day-cell-note { font-size: 11.5px; }
  .detail-body { padding: 18px 24px 50px; max-width: 900px; margin: 0 auto; }
  .detail-title { font-size: 20px; }
  .header-title .range { font-size: 17px; }
  .sheet { left: 50%; right: auto; transform: translate(-50%, 100%); width: 600px; max-width: 92vw; border-radius: 18px; bottom: 24px; }
  .sheet.open { transform: translate(-50%, 0); }
}
