/* Katie: notecard schedule like a printed homemaking chart, plus lists and a calendar. */
.kt-top { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.kt-top h1 { margin-bottom: 0.25rem; }
.kt-save { color: var(--ink-soft); font-size: 0.85rem; }
.kt-hint { color: var(--ink-soft); font-size: 0.85rem; }
.kt button { font: inherit; cursor: pointer; }
.kt-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 0.5rem 0 0.75rem; }
.kt-quick input { flex: 1 1 260px; font: inherit; padding: 0.6rem 0.75rem; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.kt-quick button, .kt-weekbar button, .kt-tabs button, .kt-clear, .kt-copy, .kt-sync form button, .kt-listcard .kt-add button { padding: 0.5rem 0.85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.kt-quick button[type=submit] { background: var(--rust); border-color: var(--rust); color: #101010; font-weight: 700; }
.kt-toast { background: #0f2e2b; border: 1px solid var(--rust); color: var(--ink); padding: 0.5rem 0.75rem; border-radius: 10px; margin-bottom: 0.75rem; }
.kt-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 1rem; }
.kt-tabs button.on { background: var(--rust); border-color: var(--rust); color: #101010; font-weight: 700; }
.kt-view[hidden], .kt-toast[hidden] { display: none; }
.kt-weekbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 0.75rem; }
.kt-weekbar span { font-weight: 700; min-width: 12em; text-align: center; }

/* the chart: Daily across the top, then Monday to Sunday in order */
.kt-board { background: #fbfaf6; border: 14px solid #6f9d95; border-radius: 14px; padding: 14px 16px 18px; color: #2b2b2b; }
.kt-title { font: 400 clamp(1.5rem, 4.5vw, 2.4rem)/1.1 "Special Elite", "Courier New", serif; text-align: center; margin: 0 auto 14px; padding-bottom: 6px; border-bottom: 2px solid #2b2b2b; width: fit-content; max-width: 100%; color: #2b2b2b; outline: none; }
.kt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 16px; }
.kt-card { position: relative; padding-top: 18px; }
.kt-card.daily { grid-column: 1 / -1; }
.kt-card.daily .kt-items { columns: 2 240px; column-gap: 28px; }
.kt-card.daily .kt-items li { break-inside: avoid; }
.kt-card.daily .kt-paper { min-height: 0; }
.kt-tab { position: absolute; top: 0; left: 0; right: 0; height: 30px; display: flex; justify-content: flex-end; align-items: baseline; gap: 8px; padding: 4px 12px 0; }
.kt-tab::before { content: ""; position: absolute; left: 10px; top: 0; width: 38%; max-width: 200px; height: 26px; background: #ece4d0; border-radius: 6px 6px 0 0; box-shadow: inset 0 1px 0 #fff; }
.kt-day-name { position: relative; font: 400 1.35rem/1 "Special Elite", "Courier New", serif; letter-spacing: 0.04em; color: #333; }
.kt-date { position: relative; font: 0.85rem/1 "Patrick Hand", cursive; color: #8a7f68; }
.kt-paper { position: relative; margin-top: 12px; padding: 12px 16px 14px; min-height: 150px; border-radius: 3px;
  background: repeating-linear-gradient(transparent 0 25px, rgba(120, 100, 70, 0.12) 25px 26px), linear-gradient(135deg, #efe6d0, #e6dbc0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18), inset 0 0 30px rgba(140, 110, 60, 0.18); font: 1.15rem/26px "Patrick Hand", "Comic Sans MS", cursive; color: #262626; }
.kt-paper::after { content: ""; position: absolute; right: 0; bottom: 0; border-style: solid; border-width: 0 0 16px 16px; border-color: transparent transparent #fbfaf6 #d8ccae; }
.kt-card.today .kt-paper { box-shadow: 0 0 0 3px var(--rust), 0 2px 6px rgba(0, 0, 0, 0.18); }
.kt-card.today .kt-day-name::after { content: " · today"; font: 0.85rem "Patrick Hand", cursive; color: #0b7d88; }
.kt-sub { text-decoration: underline; text-underline-offset: 3px; outline: none; min-height: 26px; }
.kt-sub:empty::before { content: attr(data-ph); color: #a99c7f; text-decoration: none; }
.kt-sub:empty:not(:focus) { min-height: 0; height: 0; overflow: hidden; }
.kt-paper:hover .kt-sub:empty, .kt-sub:empty:focus { height: auto; min-height: 26px; }

/* rows: circle, text, extra, remove */
.kt-items { list-style: none; margin: 0; padding: 0; }
.kt-items li { display: flex; align-items: flex-start; gap: 8px; padding: 0; margin: 0; max-width: none; }
.kt-check { flex: none; width: 18px; height: 18px; margin-top: 4px; padding: 0; border-radius: 50%; border: 2px solid #8a7f68; background: transparent; }
.kt-items li.done .kt-check { background: #14b8a6; border-color: #0b7d88; box-shadow: inset 0 0 0 2px #efe6d0; }
.kt-text { flex: 1; outline: none; overflow-wrap: anywhere; }
.kt-text:focus { background: rgba(255, 255, 255, 0.6); border-radius: 4px; }
.kt-items li.done .kt-text { text-decoration: line-through; text-decoration-thickness: 2px; opacity: 0.55; }
.kt-x { flex: none; border: 0; background: none; color: #a99c7f; font-size: 1.1rem; line-height: 1; padding: 4px 2px 0; opacity: 0.35; }
.kt-items li:hover .kt-x, .kt-x:focus { opacity: 1; }
.kt-add input { width: 100%; font: inherit; border: 0; border-bottom: 1px dashed #b8a985; background: transparent; color: inherit; padding: 0; margin-top: 2px; outline: none; }
.kt-add input::placeholder { color: #a99c7f; }
.kt-chips { display: flex; gap: 4px; margin-bottom: 4px; }
.kt-chips { flex-wrap: wrap; }
.kt-chip { padding: 0 6px; border: 1px solid #b8a985; border-radius: 6px; background: transparent; font: 0.9rem/22px "Patrick Hand", cursive; color: #5b5240; }
.kt-chip.now { font-weight: 700; }
.kt-chip.on { background: #14b8a6; border-color: #0b7d88; color: #101010; }

/* lists */
.kt-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.kt-listcard { background: linear-gradient(135deg, #efe6d0, #e6dbc0); color: #262626; border-radius: 6px; padding: 14px 16px; font: 1.15rem/28px "Patrick Hand", cursive; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.kt-listcard h2 { font: 400 1.5rem "Special Elite", serif; color: #333; margin: 0 0 8px; }
.kt-listcard .kt-add { display: flex; gap: 6px; margin-bottom: 8px; }
.kt-listcard .kt-add input[type=date] { width: auto; flex: none; font-size: 0.9rem; }
.kt-listcard .kt-add button { padding: 0.1rem 0.75rem; background: #fbfaf6; color: #262626; border-color: #b8a985; font: 0.95rem "Patrick Hand", cursive; }
.kt-due { flex: none; border: 0; background: transparent; color: #7a6f58; font: 0.85rem "Patrick Hand", cursive; width: 8.5em; }
.kt-due:not([value]), .kt-due[value=""] { opacity: 0.4; }
.kt-due.late { color: #c0392b; font-weight: 700; opacity: 1; }
.kt-clear { margin-top: 10px; background: #fbfaf6 !important; color: #262626 !important; border-color: #b8a985 !important; font: 0.9rem "Patrick Hand", cursive !important; }

/* calendar */
.kt-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.kt-dow { text-align: center; color: var(--ink-soft); font-size: 0.8rem; font-weight: 700; }
.kt-cell { min-height: 84px; display: flex; flex-direction: column; align-items: stretch; gap: 2px; text-align: left; padding: 4px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); overflow: hidden; }
.kt-cell.out { opacity: 0.4; }
.kt-cell.now .kt-num { background: var(--rust); color: #101010; border-radius: 999px; padding: 0 6px; }
.kt-cell.on { border-color: var(--rust); box-shadow: 0 0 0 1px var(--rust); }
.kt-num { font-weight: 700; font-size: 0.85rem; align-self: flex-start; }
.kt-ev { font-size: 0.72rem; line-height: 1.25; background: #0f2e2b; color: #9ff3ea; border-radius: 4px; padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kt-ev.more { background: none; color: var(--ink-soft); }
.kt-dot { font-size: 0.68rem; color: #ffb057; }
.kt-day { margin-top: 1rem; background: linear-gradient(135deg, #efe6d0, #e6dbc0); color: #262626; border-radius: 6px; padding: 14px 16px; font: 1.15rem/28px "Patrick Hand", cursive; }
.kt-day h2 { font: 400 1.5rem "Special Elite", serif; color: #333; margin: 0; }
.kt-day h3 { font: 700 0.95rem "Inter", sans-serif; color: #6b604a; margin: 12px 0 2px; text-transform: uppercase; letter-spacing: 0.06em; }
.kt-when { display: flex; gap: 4px; flex: none; }
.kt-when input, .kt-when select { font: 0.85rem "Inter", sans-serif; border: 1px solid #c9bb98; border-radius: 6px; background: #fbfaf6; color: #262626; padding: 1px 2px; }

/* phone & sync */
.kt-sync code { word-break: break-all; background: var(--card); padding: 2px 6px; border-radius: 6px; }
.kt-sync select, .kt-sync input { font: inherit; padding: 0.35rem 0.5rem; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.kt-sync label { display: block; margin: 0.75rem 0; }

@media (max-width: 700px) {
  .kt-board { border-width: 8px; padding: 10px; }
  .kt-grid, .kt-lists { grid-template-columns: 1fr; }
  .kt-cell { min-height: 54px; padding: 2px; }
  .kt-ev { font-size: 0; height: 6px; padding: 0; }
  .kt-dot { font-size: 0; height: 6px; width: 6px; border-radius: 50%; background: #ffb057; }
  .kt-weekbar span { min-width: 0; flex: 1; }
  .kt-when { flex-direction: column; }
}

.kt-save.bad { color: #ff8a80; font-weight: 700; }
.kt-lockbtn, .kt-linkbtn { margin-left: auto; padding: 0.35rem 0.8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.kt-linkbtn { margin: 0; padding: 0 0.4rem; }
.kt-empty { opacity: 0.55; font-style: italic; }
.kt-due.none { opacity: 0.35; }
.kt-ev.done { text-decoration: line-through; opacity: 0.6; }
.kt-pinform { display: flex; gap: 8px; flex-wrap: wrap; }
.kt-pinform input { width: 9em; }
.kt-pinform button { padding: 0.35rem 0.85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
#kt-app[hidden], .kt-lock[hidden] { display: none; }

/* lock screen, iPhone style */
.kt-lock { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; color: #fff;
  background: radial-gradient(circle at 30% 20%, #1d6f6a 0%, transparent 55%), radial-gradient(circle at 80% 80%, #5b3fa0 0%, transparent 50%), #0b1414; }
.kt-lock::before { content: ""; position: absolute; inset: 0; backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); background: rgba(0, 0, 0, 0.25); }
.kt-lock-inner { position: relative; display: flex; flex-direction: column; align-items: center; padding: 24px 16px; width: 100%; max-width: 360px; }
.kt-lock-time { font: 200 clamp(4rem, 18vw, 5.5rem)/1 "Inter", -apple-system, system-ui, sans-serif; letter-spacing: -0.02em; }
.kt-lock-date { font: 500 1.05rem "Inter", -apple-system, system-ui, sans-serif; opacity: 0.85; margin: 6px 0 28px; }
.kt-lock-title { font: 500 1.05rem "Inter", -apple-system, system-ui, sans-serif; min-height: 1.4em; text-align: center; }
.kt-dots { display: flex; gap: 22px; margin: 16px 0 30px; }
.kt-dots.shake { animation: kt-shake 0.4s; }
@keyframes kt-shake { 20%, 60% { transform: translateX(-14px); } 40%, 80% { transform: translateX(14px); } }
.kt-dot-pin { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid #fff; }
.kt-dot-pin.on { background: #fff; }
.kt-pad { display: grid; grid-template-columns: repeat(3, 78px); gap: 16px 26px; }
.kt-pad.off { opacity: 0.35; pointer-events: none; }
.kt-key { width: 78px; height: 78px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.16); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background 0.15s; }
.kt-key:active { background: rgba(255, 255, 255, 0.45); }
.kt-key.zero { grid-column: 2; }
.kt-key-n { font: 400 2.1rem/1 "Inter", -apple-system, system-ui, sans-serif; }
.kt-key-l { font: 700 0.62rem/1.4 "Inter", -apple-system, system-ui, sans-serif; letter-spacing: 0.18em; }
.kt-lock-foot { display: flex; justify-content: space-between; width: 100%; max-width: 290px; margin-top: 26px; }
.kt-lock-foot a, .kt-lock-foot button { color: #fff; background: none; border: 0; font: 500 1rem "Inter", system-ui, sans-serif; text-decoration: none; cursor: pointer; }
@media (max-height: 640px) { .kt-lock-time { font-size: 3rem; } .kt-lock-date { margin-bottom: 10px; } .kt-key { width: 64px; height: 64px; } .kt-pad { grid-template-columns: repeat(3, 64px); gap: 10px 22px; } }
