:root {
  --ink: #151515;
  --muted: #6f6a60;
  --line: #ded8cc;
  --page: #f3f0e8;
  --card: #fffdf8;
  --teal: #334b5f;
  --navy: #151515;
  --coral: #d96b5f;
  --purple-child: #a78bfa;
  --pink-child: #fb7185;
  --amber: #b98020;
  --soft: #f7f4ed;
  --shadow: 0 10px 24px rgba(32, 28, 22, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
  font-family:
    Pretendard, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.modal-open {
  position: fixed;
  right: 0;
  left: 0;
  overflow: hidden;
  width: 100%;
}

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

button {
  cursor: pointer;
}

.phone-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 96px;
  background:
    linear-gradient(180deg, #fcfdff 0, #eef2f7 260px),
    var(--page);
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 2px 14px;
}

.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

h1,
h2,
p {
  margin: 0;
}

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

h2 {
  font-size: 17px;
}

.mode-box,
.date-control,
label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.mode-box {
  justify-items: end;
}

.mode-box > span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--navy);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

select,
input,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  font-size: 16px;
  line-height: 1.35;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

dialog {
  max-width: calc(100vw - 24px);
  overflow-x: hidden;
}

.today-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 150px);
  gap: 14px;
  align-items: end;
  padding: 16px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(20, 143, 134, 0.12), transparent 42%),
    var(--card);
  box-shadow: var(--shadow);
}

body:not([data-panel="today"]) .today-card {
  display: none;
}

.today-card span {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--navy);
  font-size: 11px;
  font-weight: 900;
}

.today-card strong {
  display: block;
  font-size: 24px;
}

.today-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.tab {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
}

.tab.active {
  color: #fff;
  background: var(--navy);
}

.panel {
  display: none;
  margin-top: 14px;
}

.active-panel {
  display: grid;
  gap: 15px;
}

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

.quick-grid article,
.card-section,
.timeline-item,
.day-card,
.request-card,
.work-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 8px 22px rgba(39, 52, 75, 0.07);
}

.quick-grid article {
  min-height: 94px;
  padding: 14px;
}

.quick-grid span,
.stack-list span,
.item-meta,
.note-list time,
.day-card span,
.work-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.quick-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.35;
}

.card-section {
  padding: 18px;
}

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

.section-head h2 {
  line-height: 1.45;
}

.section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.compact-action {
  min-height: 32px;
  margin-top: 0;
  padding: 0 10px;
  font-size: 12px;
}

.timeline,
.stack-list,
.note-list,
.request-list,
.week-grid {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  padding: 15px;
  border-left: 5px solid var(--purple-child);
  background: rgba(167, 139, 250, 0.1);
}

.timeline-item.nayoon {
  border-left-color: var(--pink-child);
  background: rgba(251, 113, 133, 0.1);
}

.timeline-item time {
  color: var(--teal);
  font-size: 14px;
  font-weight: 950;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 5px;
}

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

.item-meta span,
.item-meta mark,
.status {
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--amber);
  font-size: 11px;
  font-weight: 900;
}

.item-meta mark {
  background: var(--coral);
}

.timeline-item h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

.timeline-item p,
.timeline-item small,
.stack-list p,
.note-list p,
.request-card p,
.admin-note,
.readonly-message p {
  color: var(--muted);
  line-height: 1.5;
}

.timeline-item small {
  display: block;
  margin-top: 4px;
}

.stack-list article {
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
}

.stack-list strong {
  display: block;
  margin: 5px 0;
  line-height: 1.35;
}

.note-list article {
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
}

.note-list article > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.inline-form {
  display: grid;
  gap: 13px;
  margin-top: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

#formDateRange {
  grid-template-columns: 1fr;
  gap: 12px;
}

#workForm .form-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.time-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.date-picker {
  display: grid;
  grid-template-columns: minmax(68px, 1.2fr) auto minmax(48px, 0.8fr) auto minmax(48px, 0.8fr) auto;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.specific-date-picker {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(58px, 0.9fr);
}

.specific-date-picker output {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.time-picker select {
  height: 42px;
  min-height: 42px;
  padding: 8px 4px;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  text-align-last: center;
}

.date-picker select {
  height: 42px;
  min-width: 0;
  min-height: 42px;
  padding: 8px 4px;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  text-align-last: center;
}

.time-picker b,
.date-picker b {
  color: var(--muted);
  font-size: 12px;
}

.medical-fields {
  display: grid;
  gap: 12px;
}

.photo-preview,
.photo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.photo-strip a {
  display: block;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

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

.form-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.primary-button,
.secondary-button,
.text-button {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 900;
}

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

.secondary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.secondary-button:disabled,
.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.danger-button {
  color: var(--coral);
  border-color: rgba(217, 107, 95, 0.36);
}

.danger-primary {
  background: var(--coral);
}

.text-button {
  margin-top: 10px;
  border: 1px solid rgba(20, 143, 134, 0.28);
  color: var(--teal);
  background: rgba(20, 143, 134, 0.08);
}

.week-grid {
  grid-template-columns: 1fr;
}

.week-control {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: center;
  width: 148px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  flex-shrink: 0;
}

.week-control button {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 36px;
  border: 0;
  color: var(--ink);
  background: transparent;
}

.week-arrow::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.week-arrow.prev::before {
  border-right: 11px solid currentColor;
}

.week-arrow.next::before {
  border-left: 11px solid currentColor;
}

.week-control button:disabled {
  color: rgba(111, 106, 96, 0.28);
  cursor: default;
}

.week-control strong {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

#week .section-head {
  align-items: flex-start;
}

.day-card {
  padding: 14px;
}

.day-card.today-day-card {
  border-color: rgba(51, 75, 95, 0.34);
  background: rgba(51, 75, 95, 0.08);
  box-shadow: inset 4px 0 0 rgba(51, 75, 95, 0.34), 0 8px 18px rgba(32, 28, 22, 0.08);
}

.day-card.selected {
  outline: 0;
}

.day-card-layout {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.day-card-date {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.day-card-date strong {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  border-radius: 50%;
  color: var(--navy);
  background: #fffdf8;
  font-size: 17px;
}

.day-card.today-day-card .day-card-date strong {
  border-color: var(--navy);
  color: #fff;
  background: var(--navy);
}

.day-card-date span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.day-card-events {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.day-card-events p {
  display: grid;
  grid-template-columns: 48px 34px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.day-card-events time,
.day-card-events b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.day-card-events p > span {
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.day-card-events .quiet {
  display: block;
  color: var(--muted);
}

.base-admin,
.admin-actions,
.button-row {
  display: grid;
  gap: 10px;
}

.base-admin {
  margin-bottom: 12px;
}

.admin-actions,
.button-row {
  grid-template-columns: 1fr 1fr;
}

.base-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.base-actions .primary-button,
.base-actions .secondary-button {
  padding-right: 8px;
  padding-left: 8px;
  white-space: nowrap;
}

.form-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.day-choice-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.compact-days {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.day-choice-grid[hidden] {
  display: none;
}

.day-choice {
  min-width: 0;
}

.day-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.day-choice span {
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fffdf8;
  font-size: 13px;
  font-weight: 950;
}

.day-choice input:checked + span {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.more-link {
  display: grid;
  justify-items: center;
  gap: 2px;
  width: max-content;
  min-height: 34px;
  margin: 14px auto 0;
  border: 0;
  padding: 0;
  color: var(--brand);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
}

.more-link b {
  font-size: 15px;
  line-height: 1;
}

.admin-note {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
  font-size: 13px;
}

.subsection-head {
  display: grid;
  gap: 4px;
  margin: 18px 0 10px;
}

.subsection-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.subsection-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.selectable-item {
  cursor: pointer;
  border: 1px solid transparent;
}

.selectable-item.selected {
  border-color: rgba(20, 143, 134, 0.44);
  background: rgba(20, 143, 134, 0.08);
  box-shadow: inset 4px 0 0 var(--teal);
}

.request-card {
  padding: 13px;
}

.request-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.status.pending {
  background: var(--coral);
}

.status.approved {
  background: var(--teal);
}

.status.rejected {
  background: var(--muted);
}

.button-row {
  margin-top: 12px;
}

.work-card {
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(38, 59, 97, 0.08), transparent),
    #fff;
}

.work-card strong,
.work-card p,
.work-card span {
  display: block;
}

.work-card p {
  margin: 8px 0;
  font-size: 24px;
  font-weight: 950;
}

.work-card .work-empty-copy {
  font-size: 15px;
  line-height: 1.35;
  white-space: nowrap;
}

.work-card small {
  display: block;
  margin-bottom: 8px;
  color: var(--coral);
  font-weight: 900;
}

.readonly-message {
  display: none;
}

body[data-role="teacher"] .parent-only,
body[data-role="parent"] .teacher-only {
  display: none;
}

body[data-role="teacher"] #admin .readonly-message {
  display: block;
}

.empty-state {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--soft);
  text-align: center;
  line-height: 1.45;
}

dialog {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

dialog::backdrop {
  background: rgba(22, 31, 45, 0.42);
}

dialog > form {
  display: grid;
  gap: 12px;
  padding: 18px;
  max-width: 100%;
  max-height: calc(100dvh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
}

.dialog-copy {
  color: var(--muted);
  line-height: 1.5;
}

.detail-card {
  display: grid;
  gap: 7px;
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
}

.detail-card span,
.detail-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.detail-card strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.detail-card p {
  color: var(--ink);
  line-height: 1.5;
}

.scope-actions {
  display: grid;
  gap: 10px;
}

.form-error {
  min-height: 18px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 900;
}

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

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 900;
}

menu {
  position: sticky;
  bottom: -18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 -18px -18px;
  padding: 12px 18px 18px;
  border-top: 1px solid rgba(222, 216, 204, 0.78);
  background: var(--card);
}

menu.one-time-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

menu.one-time-actions button {
  padding: 0 8px;
  white-space: nowrap;
}

menu button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fffdf8;
  font-weight: 900;
}

menu button[value="cancel"] {
  color: var(--muted);
  background: var(--soft);
}

@media (min-width: 760px) {
  .phone-shell {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    border-radius: 20px;
    min-height: calc(100vh - 40px);
    overflow: hidden;
  }

  .tabbar {
    left: 50%;
    transform: translateX(-50%);
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }
}

@media (max-width: 390px) {
  .today-card,
  .quick-grid,
  .base-admin,
  .button-row {
    grid-template-columns: 1fr;
  }

  .admin-actions {
    grid-template-columns: 1fr 1fr;
  }

  .base-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .form-row {
    gap: 8px;
  }

  h1 {
    font-size: 25px;
  }

  .tab {
    font-size: 12px;
  }
}

/* MVP visual refresh */
:root {
  --brand: #334b5f;
  --brand-deep: #151515;
  --brand-soft: #eef1f2;
  --brand-pale: #f7f4ed;
  --blue-child: #4c6576;
  --blue-soft: #eef1f2;
  --violet: #6b6378;
  --surface: #fbfaf6;
}

body {
  background: #f3f0e8;
}

.phone-shell {
  padding: 0 0 96px;
  background: var(--surface);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  align-items: center;
  padding: 13px 18px 11px;
  color: var(--ink);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(32, 28, 22, 0.04);
}

.app-header h1 {
  position: static;
  flex: 1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: left;
}

.app-header h1 span {
  color: inherit;
  font-weight: 500;
}

.header-actions {
  display: inline-grid;
  min-width: 58px;
  justify-items: end;
}

.header-admin-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.header-intro-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fffdf8;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.header-intro-button.active {
  border-color: rgba(21, 21, 21, 0.32);
  background: var(--brand-soft);
}

.header-admin-button,
.header-intro-button,
.header-home-button {
  display: inline-grid;
  place-items: center;
}

.header-home-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fffdf8;
  text-decoration: none;
}

.header-home-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.today-card {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 0 0 22px;
  padding: 14px 18px 18px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: var(--surface);
  box-shadow: none;
}

.today-summary {
  min-width: 0;
}

.today-card .today-summary span {
  display: inline-flex;
  margin: 0 0 5px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
}

.today-card p {
  margin-top: 5px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.2;
}

.today-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.date-control {
  grid-column: 1 / -1;
  color: var(--muted);
}

.date-control select {
  border: 1px solid var(--line);
  color: var(--brand-deep);
  background: #fffdf8;
  font-weight: 950;
  box-shadow: none;
}

.child-filter {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.child-filter button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fffdf8;
  font-weight: 950;
  box-shadow: none;
}

.child-filter button.active {
  border-color: var(--brand-deep);
  color: #fff;
  background: var(--brand-deep);
  box-shadow: none;
}

.child-filter span {
  display: block;
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--purple-child);
}

.child-filter [data-child-filter="nayoon"] span {
  background: var(--pink-child);
}

.panel {
  padding: 0 18px;
}

.quick-grid {
  margin-top: -6px;
}

.quick-grid article,
.card-section,
.timeline-item,
.day-card,
.request-card,
.work-card {
  border-color: rgba(135, 144, 160, 0.18);
  box-shadow: 0 8px 18px rgba(32, 28, 22, 0.08);
}

.quick-grid article {
  background: #fffdf8;
}

.quick-grid strong {
  color: #1f2937;
  font-size: 15px;
}

.card-section {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.section-head {
  margin: 4px 0 14px;
}

.section-head h2 {
  font-size: 20px;
  line-height: 1.45;
}

.section-head span,
.section-actions span {
  color: #7b8492;
  font-size: 13px;
}

.timeline {
  gap: 10px;
}

.timeline-item {
  grid-template-columns: 60px minmax(0, 1fr);
  min-height: 0;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--purple-child);
  background:
    linear-gradient(90deg, rgba(107, 99, 120, 0.1), rgba(255, 253, 248, 0.96) 58%),
    #fffdf8;
}

.timeline-item.nayoon {
  border-left-color: var(--pink-child);
  background:
    linear-gradient(90deg, rgba(180, 105, 117, 0.1), rgba(255, 253, 248, 0.96) 58%),
    #fffdf8;
}

.time-cell {
  display: grid;
  align-content: start;
  gap: 4px;
}

.time-cell time {
  color: var(--brand);
  font-size: 15px;
  font-weight: 950;
}

.time-cell span {
  color: #7b8492;
  font-size: 13px;
  font-weight: 900;
}

.item-meta {
  margin-bottom: 5px;
}

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

.item-meta span,
.item-meta mark,
.item-meta em,
.status {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--blue-soft);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.item-meta em {
  margin-left: auto;
  color: #fff;
  background: var(--brand);
}

.item-meta mark {
  color: #fff;
  background: var(--brand-deep);
}

.timeline-item h3 {
  margin-bottom: 5px;
  font-size: 18px;
  line-height: 1.28;
}

.timeline-item p,
.timeline-item small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.stack-list article,
.note-list article,
.empty-state {
  padding: 15px;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 8px 18px rgba(32, 28, 22, 0.05);
}

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

.secondary-button {
  border-color: var(--line);
  color: var(--ink);
  background: #fffdf8;
}

.scope-actions .secondary-button[value="cancel"] {
  color: var(--muted);
  background: var(--soft);
}

.text-button {
  border-color: var(--line);
  color: var(--brand);
  background: var(--brand-soft);
}

.compact-action {
  color: var(--ink);
  background: transparent;
}

.tabbar {
  min-height: 72px;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  border-top-color: rgba(135, 144, 160, 0.18);
  background: #fffdf8;
}

.tab {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 56px;
  color: #717987;
  font-size: 12px;
}

.tab svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.tab span {
  line-height: 1.1;
}

.tab.active {
  color: var(--brand);
  background: transparent;
}

body[data-panel="intro"] .today-card,
body[data-panel="intro"] .tabbar {
  display: none;
}

body[data-panel="intro"] .phone-shell {
  padding-bottom: 0;
}

.intro-page {
  padding: 0;
  margin-top: 0;
  background: linear-gradient(180deg, #fffdf8 0, #f7f4ed 72%, #fffdf8 100%);
  padding-bottom: env(safe-area-inset-bottom);
}

.intro-page.active-panel {
  display: grid;
  gap: 0;
}

.intro-block {
  display: grid;
  gap: 22px;
  padding: 48px 20px;
  animation: introFadeUp 520ms ease both;
}

.intro-hero {
  padding-top: 42px;
}

.intro-section {
  border-top: 1px solid rgba(222, 216, 204, 0.62);
}

.intro-copy {
  display: grid;
  gap: 14px;
}

.intro-copy h1,
.intro-copy h2,
.intro-closing h2 {
  color: var(--ink);
  letter-spacing: 0;
}

.intro-copy h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 620;
  line-height: 1.34;
}

.intro-copy h1 em {
  color: #5f785f;
  font-style: normal;
}

.intro-copy h2,
.intro-closing h2 {
  font-size: 21px;
  font-weight: 680;
  line-height: 1.42;
}

.intro-copy p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.76;
}

.intro-page img {
  display: block;
  width: 100%;
  aspect-ratio: 1.32;
  border: 1px solid rgba(222, 216, 204, 0.74);
  border-radius: 8px;
  object-fit: cover;
  background: #fffdf8;
  box-shadow: 0 10px 22px rgba(32, 28, 22, 0.06);
}

.intro-closing {
  display: grid;
  gap: 20px;
  justify-items: start;
  min-height: 300px;
  padding: 68px 20px 76px;
  border-top: 1px solid rgba(222, 216, 204, 0.62);
  animation: introFadeUp 520ms ease both;
}

.intro-closing strong {
  font-family: Georgia, "Times New Roman", serif;
  color: #5f785f;
  font-size: 21px;
  font-weight: 680;
}

.intro-guide-entry {
  display: grid;
  gap: 14px;
  justify-items: start;
  padding: 34px 20px 46px;
  border-top: 1px solid rgba(222, 216, 204, 0.42);
  background: rgba(255, 253, 248, 0.42);
}

.intro-guide-entry p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.intro-guide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(111, 138, 115, 0.12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.48);
  box-shadow: none;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.intro-guide {
  display: grid;
  gap: 22px;
  padding: 52px 20px 82px;
  scroll-margin-top: 74px;
  border-top: 1px solid rgba(222, 216, 204, 0.62);
  background: rgba(255, 253, 248, 0.58);
}

.intro-guide-list {
  display: grid;
  gap: 12px;
}

.intro-guide-list article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 15px;
  border: 1px solid rgba(222, 216, 204, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(32, 28, 22, 0.05);
}

.intro-guide-list article > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 500;
}

.intro-guide-list h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.intro-guide-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.62;
}

.intro-page .intro-guide-shot {
  width: 100%;
  max-height: 330px;
  margin-top: 13px;
  aspect-ratio: 0.64;
  border-color: rgba(222, 216, 204, 0.58);
  object-fit: cover;
  object-position: center center;
  box-shadow: 0 8px 18px rgba(32, 28, 22, 0.05);
}

.intro-guide-collapse {
  display: flex;
  justify-content: center;
  padding-top: 16px;
}

@keyframes introFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-block,
  .intro-closing {
    animation: none;
  }
}

@media (max-width: 390px) {
  .app-header {
    padding-right: 16px;
    padding-left: 16px;
  }

  .today-card {
    padding-right: 16px;
    padding-left: 16px;
  }

  .timeline-item {
    grid-template-columns: 60px minmax(0, 1fr);
  }
}

#noteForm .button-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#noteForm .button-row button {
  min-width: 0;
  width: 100%;
  padding-right: 8px;
  padding-left: 8px;
  white-space: nowrap;
}
