
/* V8.14 Compact Mobile Timetable */
html { font-size: 14px; }
body { overflow-x: hidden; }
* { box-sizing: border-box; }
button, input, select, textarea { font-size: 13px; }
h1 { font-size: 20px; line-height: 1.2; }
h2 { font-size: 17px; line-height: 1.2; }
h3 { font-size: 15px; line-height: 1.2; }
p, label, .muted, .small { font-size: 12px; }
.app, main, .page, .content, .screen { max-width: 100%; width: 100%; overflow-x: hidden; }
table { width: 100%; table-layout: fixed; font-size: 11px; }
th, td { padding: 5px 4px; overflow-wrap: anywhere; word-break: break-word; }
.card, .panel, .modal-card { max-width: 100%; }
.modal-card { width: min(94vw, 520px); max-height: 88vh; overflow-y: auto; }
input, select, textarea { max-width: 100%; }
textarea { min-height: 70px; }
button { min-height: 36px; padding: 7px 10px; }
@media (max-width: 600px) {
  html { font-size: 13px; }
  h1 { font-size: 18px; }
  h2 { font-size: 16px; }
  h3 { font-size: 14px; }
  .timetable-list, .monthly-timetable, .timetable-month-list { width: 100%; }
  .timetable-entry, .timetable-day, .timetable-card {
    width: 100%;
    min-width: 0;
    padding: 8px;
    margin-bottom: 7px;
  }
  .timetable-entry *, .timetable-day *, .timetable-card * { min-width: 0; }
  .timetable-subject, .subject, .task-title { font-size: 12px; line-height: 1.3; }
  .timetable-date, .day-heading { font-size: 12px; font-weight: 700; }
  .progress-report, .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
  .bottom-nav { font-size: 11px; }
  .bottom-nav button, .bottom-nav a { padding: 6px 3px; min-width: 0; }
}


/* V8.15 phone-safe timetable modal */
.df-tt-overlay{position:fixed;inset:0;z-index:100000;background:rgba(0,0,0,.48);display:flex;align-items:center;justify-content:center;padding:10px;overflow:auto}
.df-tt-modal{width:min(92vw,390px);max-height:82vh;overflow:auto;background:var(--card,#fff);color:var(--text,#111);border-radius:16px;padding:12px;box-shadow:0 12px 40px rgba(0,0,0,.28);font-size:12px}
.df-tt-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;font-size:15px}
.df-tt-head button{border:0;background:transparent;font-size:20px;line-height:1;padding:2px 6px}
.df-tt-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.df-tt-modal label{display:block;font-size:11px;margin:5px 0}
.df-tt-modal input,.df-tt-modal textarea{display:block;width:100%;max-width:100%;min-height:32px;padding:6px 7px;font-size:12px;border-radius:8px}
.df-tt-modal details{margin-top:7px}
.df-tt-modal summary{font-size:11px;padding:5px 0}
.df-tt-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:9px}
.df-tt-actions button{font-size:12px;min-height:32px;padding:6px 10px}
@media(max-width:430px){.df-tt-overlay{padding:7px}.df-tt-modal{width:94vw;max-height:80vh;padding:10px}.df-tt-grid{gap:5px}}


/* V8.16 Excel-style timetable: compact side-by-side columns */
.df-excel-wrap{width:100%;max-width:100%;overflow-x:hidden;border:1px solid var(--border,#ddd);border-radius:8px;background:var(--card,#fff)}
.df-excel-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:10px;line-height:1.2}
.df-excel-table th,.df-excel-table td{border:1px solid var(--border,#ddd);padding:4px 3px;vertical-align:top;overflow-wrap:anywhere;word-break:break-word}
.df-excel-table th{font-size:9px;font-weight:700;white-space:nowrap;text-align:center}
.df-excel-table th:first-child{width:11%}.df-excel-table th:nth-child(2){width:27%}.df-excel-table th:nth-child(3){width:27%}.df-excel-table th:nth-child(4){width:27%}.df-excel-table th:nth-child(5){width:5%}.df-excel-table th:nth-child(6){width:3%}
.df-excel-table .df-date{font-size:9px;font-weight:600;white-space:nowrap;text-align:center}
.df-checkcell{display:flex;align-items:flex-start;gap:3px;font-size:10px;line-height:1.2}
.df-checkcell input{width:12px;height:12px;min-width:12px;margin:1px 0 0}
.df-done{text-decoration:line-through;opacity:.55}
.df-progress{text-align:center;font-size:9px;white-space:nowrap}
.df-actions{white-space:nowrap;text-align:center}
.df-actions button{font-size:8px;min-height:22px;padding:2px 3px;margin:1px;border:0;background:transparent}
.df-empty{text-align:center;padding:16px!important}
@media(max-width:430px){
 .df-excel-table{font-size:9px}
 .df-excel-table th,.df-excel-table td{padding:3px 2px}
 .df-excel-table th:first-child{width:12%}.df-excel-table th:nth-child(2){width:28%}.df-excel-table th:nth-child(3){width:28%}.df-excel-table th:nth-child(4){width:28%}.df-excel-table th:nth-child(5){width:4%}.df-excel-table th:nth-child(6){display:none}
 .df-actions{display:none}
 .df-checkcell{font-size:9px}
}

/* V8.17 visible edit control */
.df-excel-table .df-actions{width:38px;text-align:center}
.df-excel-table .df-actions button{display:inline-block;font-size:8px;min-height:22px;padding:2px 4px}
@media(max-width:430px){.df-excel-table .df-actions{display:table-cell;width:32px}.df-excel-table .df-actions button{font-size:7px;padding:2px}}
