:root {
  --background: #f4f0e8;
  --surface: #fffdf9;
  --ink: #20231f;
  --muted: #74776f;
  --accent: #236b4b;
  --accent-dark: #18543a;
  --danger: #b3453f;
  --border: #dedbd2;
  --shadow: 0 18px 50px rgba(44, 47, 39, .09);
  --radius: 22px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(circle at 80% 0, #e3ecdf 0, transparent 32rem), var(--background);
  font-family: Manrope, sans-serif;
}
button, textarea, select, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(100% - 32px, 760px); margin: 0 auto; padding: 72px 0 100px; }
.hero { text-align: center; margin-bottom: 56px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #d4a72c; box-shadow: 0 0 0 4px rgba(212,167,44,.14); }
.status-dot.online { background: #3a966a; box-shadow: 0 0 0 4px rgba(58,150,106,.14); }
h1 { margin: 18px 0 10px; font-family: Unbounded, sans-serif; font-size: clamp(34px, 8vw, 58px); letter-spacing: -.04em; }
.hero > p { margin: 0 0 22px; color: var(--muted); }
.category-tabs { display: flex; justify-content: center; gap: 6px; margin: 0 auto 26px; padding: 5px; width: fit-content; max-width: 100%; overflow-x: auto; border: 1px solid rgba(222,219,210,.8); border-radius: 999px; background: rgba(255,253,249,.6); }
.category-tab { border: 0; border-radius: 999px; padding: 9px 16px; color: var(--muted); background: transparent; font-weight: 700; white-space: nowrap; transition: color .18s, background .18s, box-shadow .18s; }
.category-tab:hover { color: var(--ink); }
.category-tab.active { color: white; background: var(--accent); box-shadow: 0 6px 15px rgba(35,107,75,.18); }
.primary-button, .secondary-button, .danger-button { border: 0; border-radius: 999px; padding: 13px 21px; font-weight: 700; transition: transform .18s, background .18s, box-shadow .18s; }
.primary-button { color: white; background: var(--accent); box-shadow: 0 10px 24px rgba(35,107,75,.2); }
.primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.secondary-button { color: var(--ink); background: #eeece6; }
.danger-button { color: white; background: var(--danger); }
button:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(35,107,75,.28); outline-offset: 3px; }
.section-heading { display: flex; align-items: center; gap: 10px; margin: 0 4px 18px; }
.section-heading h2 { margin: 0; font-size: 18px; }
.counter { display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 7px; border-radius: 99px; color: var(--muted); background: rgba(255,255,255,.65); font-size: 12px; font-weight: 700; }
.reminder-list { display: grid; gap: 12px; }
.reminder-card { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 22px 24px; border: 1px solid rgba(222,219,210,.75); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); animation: enter .25s ease both; }
.reminder-date { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.reminder-alarm { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 11px; padding: 5px 9px; border-radius: 999px; color: var(--accent-dark); background: #e7f0e9; font-size: 11px; font-weight: 700; }
.reminder-image { display: block; width: 100%; max-height: 420px; margin: 4px 0 15px; border-radius: 15px; object-fit: cover; background: #eeece6; }
.video-thumbnail { position: relative; display: block; width: 100%; margin: 4px 0 15px; padding: 0; overflow: hidden; border: 0; border-radius: 15px; background: #242824; }
.video-thumbnail img { display: block; width: 100%; max-height: 420px; aspect-ratio: 16 / 9; object-fit: cover; opacity: .92; }
.video-thumbnail::after { position: absolute; inset: 0; content: ''; background: linear-gradient(transparent 55%, rgba(0,0,0,.28)); pointer-events: none; }
.video-play-button { position: absolute; z-index: 1; top: 50%; left: 50%; display: grid; place-items: center; width: 58px; height: 58px; padding-left: 4px; border-radius: 50%; color: white; background: rgba(24,84,58,.92); box-shadow: 0 10px 28px rgba(0,0,0,.28); transform: translate(-50%, -50%); transition: transform .18s, background .18s; }
.video-thumbnail:hover .video-play-button { background: var(--accent); transform: translate(-50%, -50%) scale(1.06); }
.reminder-text { margin: 0; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.card-actions { display: flex; align-items: start; gap: 5px; }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: transparent; }
.icon-button:hover { color: var(--ink); background: #f0eee8; }
.icon-button.delete:hover { color: var(--danger); background: #faecea; }
.icon-button svg { width: 18px; height: 18px; }
.empty-state { padding: 55px 24px; border: 1px dashed #cbc8be; border-radius: var(--radius); text-align: center; }
.empty-icon { color: var(--accent); font-size: 30px; }
.empty-state h3 { margin: 14px 0 5px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 14px; }
.notice { margin-bottom: 15px; padding: 12px 16px; border-radius: 12px; color: #713731; background: #f8e5e2; font-size: 14px; }
.modal { width: min(100% - 28px, 560px); padding: 0; border: 0; border-radius: 26px; color: var(--ink); background: var(--surface); box-shadow: 0 30px 90px rgba(20,25,20,.25); }
.modal::backdrop { background: rgba(31,35,31,.45); backdrop-filter: blur(5px); }
.modal form { padding: 28px; }
.modal-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.modal h2 { margin: 4px 0 0; font-size: 23px; }
.modal-kicker { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.close-button { font-size: 28px; }
.modal label { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 700; }
.optional-label { color: var(--muted); font-size: 11px; font-weight: 500; }
textarea, select { width: 100%; padding: 15px; border: 1px solid var(--border); border-radius: 14px; color: var(--ink); background: white; line-height: 1.5; }
textarea { resize: vertical; min-height: 130px; margin-bottom: 16px; }
select { margin-bottom: 16px; }
.reminder-toggle { display: flex !important; align-items: center; gap: 10px; width: fit-content; margin: 2px 0 14px !important; cursor: pointer; }
.reminder-toggle input { width: 19px; height: 19px; accent-color: var(--accent); }
.reminder-fields { margin: -3px 0 16px; padding: 14px; border-radius: 14px; background: #f0eee8; }
.reminder-fields input[type="datetime-local"] { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 11px; color: var(--ink); background: white; }
.push-hint { margin: 8px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.file-input { width: 100%; margin-bottom: 12px; padding: 10px; border: 1px dashed var(--border); border-radius: 14px; color: var(--muted); background: white; }
.file-input::file-selector-button { margin-right: 10px; padding: 8px 12px; border: 0; border-radius: 10px; color: var(--ink); background: #eeece6; font-weight: 700; cursor: pointer; }
.image-preview { position: relative; margin-bottom: 12px; padding: 10px; border-radius: 16px; background: #eeece6; }
.image-preview img { display: block; width: 100%; max-height: 260px; border-radius: 11px; object-fit: contain; }
.remove-image-button { display: block; margin: 9px auto 0; border: 0; color: var(--danger); background: transparent; font-size: 12px; font-weight: 700; }
.video-file-preview { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; margin-bottom: 12px; padding: 12px; border-radius: 14px; background: #eeece6; }
.video-file-icon { display: grid; place-items: center; width: 38px; height: 38px; padding-left: 2px; border-radius: 50%; color: white; background: var(--accent); font-size: 13px; }
.video-file-details { min-width: 0; }
.video-file-details strong, .video-file-details small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-file-details strong { font-size: 12px; }
.video-file-details small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.video-file-preview .remove-image-button { margin: 0; }
.field-meta { display: flex; justify-content: space-between; gap: 12px; min-height: 28px; padding-top: 7px; color: var(--muted); font-size: 12px; }
.form-error { color: var(--danger); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.confirm-modal { width: min(100% - 28px, 440px); }
.confirm-modal p { color: var(--muted); }
.notification-modal { width: min(100% - 28px, 460px); text-align: center; }
.notification-modal p { color: var(--muted); line-height: 1.55; }
.notification-symbol { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%; color: white; background: var(--accent); font-size: 26px; }
.notification-modal .modal-actions { justify-content: center; }
.video-modal { width: min(100% - 24px, 1100px); max-width: none; padding: 0; overflow: visible; border: 0; background: transparent; }
.video-modal::backdrop { background: rgba(8,10,8,.88); backdrop-filter: blur(7px); }
.video-modal video { display: block; width: 100%; max-height: 88vh; border-radius: 16px; background: #000; box-shadow: 0 25px 80px rgba(0,0,0,.5); }
.video-close-button { position: absolute; z-index: 2; top: -18px; right: -18px; display: grid; place-items: center; width: 46px; height: 46px; padding: 0 0 3px; border: 2px solid rgba(255,255,255,.35); border-radius: 50%; color: white; background: #20231f; font-size: 31px; line-height: 1; box-shadow: 0 8px 25px rgba(0,0,0,.4); }
@keyframes enter { from { opacity: 0; transform: translateY(7px); } }
@media (max-width: 560px) {
  .shell { width: min(100% - 22px, 760px); padding-top: 42px; }
  .hero { margin-bottom: 42px; }
  .category-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    padding: 6px;
    overflow: visible;
    border-radius: 20px;
  }
  .category-tab {
    min-width: 0;
    padding: 10px 6px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .reminder-card { grid-template-columns: 1fr; padding: 20px; }
  .card-actions { justify-content: flex-end; margin-top: -4px; }
  .modal form { padding: 22px; }
  .video-close-button { top: -52px; right: 0; }
  .video-modal video { max-height: 82vh; border-radius: 12px; }
  .video-file-preview { grid-template-columns: auto minmax(0, 1fr); }
  .video-file-preview .remove-image-button { grid-column: 1 / -1; }
}
@media (max-width: 350px) {
  .category-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
