@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
  color-scheme: light;

  /* color tokens */
  --color-bg: #f4ede3;
  --color-surface: #fffaf2;
  --color-surface-soft: #f7efe4;
  --color-text: #2a2622;
  --color-text-muted: #6f6257;
  --color-line: #d8c8b3;
  --color-primary: #ff5e5b;
  --color-primary-strong: #f85b57;
  --color-primary-text: #a93230;
  --color-primary-contrast: #2a2622;
  --color-secondary: #1a1b3a;
  --color-secondary-contrast: #fff;
  --color-focus: rgba(255, 94, 91, 0.26);
  --color-success-bg: #edf4e9;
  --color-success-text: #50694e;
  --color-info-bg: #f5efe5;
  --color-info-text: #1a1b3a;
  --color-info-accent: #315e9a;
  --color-warning-bg: #fff2d6;
  --color-warning-text: #765214;
  --color-danger-bg: #fce9e3;
  --color-danger-text: #b54e45;
  --color-control-line: #9a8979;
  --border: var(--color-line);
  --text: var(--color-text);
  --muted: var(--color-text-muted);

  /* spacing tokens */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* radius tokens */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* shadow tokens */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.08);

  /* typography tokens */
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
}

body[data-theme='dark'] {
  color-scheme: dark;
  --color-bg: #161715;
  --color-surface: #24251f;
  --color-surface-soft: #2e3028;
  --color-text: #f1eee7;
  --color-text-muted: #bdb5a8;
  --color-line: #514d43;
  --color-primary: #ff756f;
  --color-primary-strong: #ff625c;
  --color-primary-text: #ff8f89;
  --color-primary-contrast: #1d1d18;
  --color-secondary: #f4d27a;
  --color-secondary-contrast: #1d1d18;
  --color-focus: rgba(255, 117, 111, 0.32);
  --color-success-bg: #243326;
  --color-success-text: #a8d8a2;
  --color-info-bg: #2b2d31;
  --color-info-text: #f1eee7;
  --color-info-accent: #9ec5ff;
  --color-warning-bg: #3b3220;
  --color-warning-text: #f2cf83;
  --color-danger-bg: #3a2623;
  --color-danger-text: #ffb0a7;
  --color-control-line: #817b6d;
  --border: var(--color-line);
  --text: var(--color-text);
  --muted: var(--color-text-muted);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--font-size-base);
  line-height: 1.55;
  background-color: var(--color-bg);
  background-image:
    linear-gradient(180deg, rgba(255, 250, 242, 0.72), rgba(244, 237, 227, 0.92)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 11px);
  background-attachment: fixed;
  color: var(--color-text);
}

body[data-theme='dark'] {
  background-image:
    linear-gradient(180deg, rgba(36, 37, 31, 0.78), rgba(22, 23, 21, 0.96)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 11px);
}

a { color: inherit; }

.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-shell.has-app-chrome {
  padding-bottom: 92px;
}

.site-header,
.site-footer {
  background: rgba(255, 250, 242, 0.9);
  border-bottom: 1px solid rgba(216, 200, 179, 0.82);
}

body[data-theme='dark'] .site-header,
body[data-theme='dark'] .site-footer,
body[data-theme='dark'] .app-aside,
body[data-theme='dark'] .bottom-navigator,
body[data-theme='dark'] .card,
body[data-theme='dark'] .section {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(36, 37, 31, 0.94);
}

.site-header {
  position: relative;
  z-index: 900;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 28px rgba(26, 27, 58, 0.06);
}

.daily-date-context {
  position: sticky;
  top: 0;
  z-index: 820;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--color-surface) 94%, transparent);
  padding: max(8px, env(safe-area-inset-top)) 2px 8px;
  backdrop-filter: blur(16px);
}

.daily-date-arrow,
.daily-today-link,
.daily-context-icon {
  min-width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.daily-date-arrow { font-size: 25px; }
.daily-today-link { min-width: 44px; padding: 0 8px; color: var(--color-primary-text); font-size: 12px; font-weight: 900; }
.daily-date-arrow:hover,
.daily-today-link:hover,
.daily-context-icon:hover { background: var(--color-surface-soft); }
.daily-date-arrow:focus-visible,
.daily-today-link:focus-visible,
.daily-context-icon:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 1px; }

.daily-date-picker {
  position: relative;
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 1px;
  text-align: center;
}
.daily-date-picker strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.daily-date-picker span { overflow: hidden; color: var(--color-text-muted); font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.daily-date-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.daily-date-swipe { display:flex; flex:0 1 auto; min-width:0; align-items:center; padding:0 4px; border-radius:12px; background:color-mix(in srgb,var(--color-text) 3%,transparent); touch-action:pan-y; }
.daily-date-picker { flex:0 0 auto; display:flex; align-items:center; gap:3px; min-height:44px; text-align:left; }
.daily-date-picker .daily-date-value { color:var(--color-text); font-size:22px; font-weight:800; line-height:1; }
.daily-date-picker .daily-date-value.is-holiday { color:var(--color-danger-text); }
.daily-date-picker .daily-date-value.is-saturday { color:var(--color-info-accent); }
.daily-date-picker .daily-date-weekday { color:var(--color-text-muted); font-size:11px; }
.daily-date-picker .daily-date-caret { display:inline-flex; flex:0 0 12px; align-items:center; justify-content:center; width:12px; color:var(--color-text); font-size:13px; line-height:1; }
.daily-date-arrow, .daily-today-link { min-width:44px; width:44px; height:44px; padding:0; }
.daily-today-link { color:var(--color-text-muted); font-size:11px; }
.daily-date-context > .daily-context-actions { margin-left:auto; flex:0 0 auto; }
.daily-date-context .daily-context-icon { width:44px; min-width:44px; height:44px; }
.daily-context-actions { display: none; align-items: center; }
.daily-context-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.daily-context-menu { align-content: center; gap: 4px; }
.daily-context-menu span { width: 19px; height: 2px; border-radius: 999px; background: currentColor; }

.site-footer {
  border-top: 1px solid rgba(216, 200, 179, 0.82);
  border-bottom: 0;
  margin-top: auto;
}

.site-header-inner,
.site-footer-inner,
.page {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: var(--space-4);
}

.site-brand {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  font-size: var(--font-size-base);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-brand a {
  text-decoration: none;
}

.settings-theme-form {
  display: grid;
  gap: var(--space-2);
}

.importance-choice-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.importance-choice-group legend {
  margin-bottom: 6px;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 800;
}

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

.importance-choice-group legend {
  grid-column: 1 / -1;
}

.importance-choice-group label {
  min-width: 0;
  cursor: pointer;
}

.importance-choice-group input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.importance-choice-group label > span {
  min-height: 52px;
  display: grid;
  place-content: center;
  gap: 1px;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: var(--color-surface-soft);
  padding: 5px 3px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.importance-choice-group strong {
  font-size: 16px;
  line-height: 1;
}

.importance-choice-group small {
  overflow: hidden;
  font-size: 9px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.importance-choice-group input:checked + span {
  border-color: var(--color-primary);
  background: rgba(255, 94, 91, 0.13);
  color: var(--color-primary-text);
}

.importance-choice-group input:focus-visible + span {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.settings-theme-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  border: 1px solid rgba(216, 200, 179, 0.78);
  border-radius: var(--radius-sm);
  background: rgba(255, 250, 242, 0.72);
  padding: 0 var(--space-3);
  font-weight: 800;
}

body[data-theme='dark'] .settings-theme-option {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(46, 48, 40, 0.72);
}

.settings-notification-form,
.settings-notification-grid {
  display: grid;
  gap: var(--space-2);
}

.settings-notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.settings-toggle-option,
.settings-time-option {
  display: grid;
  gap: var(--space-2);
  min-height: 44px;
  border: 1px solid rgba(216, 200, 179, 0.78);
  border-radius: var(--radius-sm);
  background: rgba(255, 250, 242, 0.72);
  padding: var(--space-3);
  font-weight: 800;
}

.settings-toggle-option {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.settings-time-option {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.settings-time-option .input {
  grid-column: 1 / -1;
}

body[data-theme='dark'] .settings-toggle-option,
body[data-theme='dark'] .settings-time-option {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(46, 48, 40, 0.72);
}

.has-app-chrome .site-header-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
  min-height: 56px;
}

.has-app-chrome .site-brand {
  grid-column: 1;
  max-width: 140px;
}

.site-header-guidance {
  grid-column: 2;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.site-header-guidance a,
.site-header-guidance button {
  min-width: 0;
  max-width: 100%;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 94, 91, 0.2);
  border-radius: 999px;
  background: rgba(255, 94, 91, 0.08);
  padding: 6px 10px;
  color: var(--color-text);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.site-header-guidance a span:first-child,
.site-header-guidance button span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-header-guidance a:hover,
.site-header-guidance a:focus-visible,
.site-header-guidance button:hover,
.site-header-guidance button:focus-visible {
  border-color: rgba(255, 94, 91, 0.48);
  background: rgba(255, 94, 91, 0.14);
}

body[data-theme='dark'] .site-header-guidance a,
body[data-theme='dark'] .site-header-guidance button {
  border-color: rgba(255, 117, 111, 0.3);
  background: rgba(255, 117, 111, 0.12);
}

.menu-toggle,
.header-search-toggle,
.header-search-close,
.header-search-submit,
.aside-close {
  border: 0;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-content: center;
  gap: 5px;
}

.site-header-actions {
  grid-column: 3;
  display: flex;
  align-items: center;
}

.header-search-toggle,
.header-search-close {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
}

.header-search-toggle svg,
.header-search-submit svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-search-panel {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--color-control-line);
  border-radius: 0;
  background: var(--color-surface);
  box-shadow: 0 6px 20px rgba(26, 27, 58, 0.12);
  transform: translateY(-50%);
}

.header-search-panel[hidden] { display: none; }
.header-search-field { display:flex; min-width:0; align-items:center; overflow:hidden; border:1px solid var(--color-control-line); border-radius:10px; }
.header-search-field:focus-within { outline:2px solid color-mix(in srgb,var(--color-text) 45%,transparent); outline-offset:1px; }
.header-search-panel .input,
body[data-theme='dark'] .header-search-panel .input { flex:1 1 auto; width:0; min-width:0; min-height:40px; height:40px; padding:0 8px; border:0; border-radius:0; background:transparent; box-shadow:none; }
.header-search-panel .input:focus-visible { outline:none; }
.header-search-submit { display: inline-flex; flex:0 0 auto; min-height:40px; align-items:center; justify-content:center; gap:5px; border:0; border-left:1px solid var(--color-control-line); border-radius:0; background:var(--color-surface-soft); padding:0 12px; color:var(--color-text); font-weight:800; }
.header-search-submit:focus-visible { outline:2px solid color-mix(in srgb,var(--color-text) 45%,transparent); outline-offset:-3px; }
.header-search-submit svg { width: 16px; height: 16px; }
.header-search-close { font-size: 25px; }
.header-search-backdrop { position:fixed; inset:0; z-index:1190; border:0; padding:0; background:rgba(26,27,58,.48); cursor:pointer; }
.header-search-backdrop[hidden] { display:none; }
.site-header.is-search-open { z-index:1201; background:color-mix(in srgb,var(--color-surface) 60%,#1a1b3a); }
.site-header.is-search-open .site-brand,
.site-header.is-search-open .site-header-guidance,
.site-header.is-search-open .site-header-actions { visibility:hidden; }

.menu-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.app-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(26, 27, 58, 0.34);
}

.app-aside {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000;
  width: min(86vw, 340px);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: var(--space-5);
  background: rgba(255, 250, 242, 0.98);
  border-left: 1px solid rgba(216, 200, 179, 0.85);
  box-shadow: -16px 0 36px rgba(26, 27, 58, 0.16);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.app-aside.is-open {
  transform: translateX(0);
}

.app-aside-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.aside-settings-link {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(216, 200, 179, 0.74);
  border-radius: 999px;
  background: rgba(247, 239, 228, 0.72);
  color: var(--color-secondary);
  text-decoration: none;
  font-size: 20px;
  line-height: 1;
}

.aside-settings-link:hover,
.aside-settings-link[aria-current='page'] {
  background: rgba(255, 94, 91, 0.1);
  color: var(--color-primary-text);
}

body[data-theme='dark'] .aside-settings-link,
body[data-theme='dark'] .aside-user {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(46, 48, 40, 0.82);
}

body[data-theme='dark'] .aside-settings-link {
  color: var(--color-secondary);
}

body[data-theme='dark'] .aside-user-avatar {
  background: var(--color-secondary);
  color: #1d1d18;
}

.aside-close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-size: 24px;
}

.aside-close:hover {
  background: var(--color-surface-soft);
}

.aside-user {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  padding: var(--space-3);
  border: 1px solid rgba(216, 200, 179, 0.72);
  border-radius: var(--radius-md);
  background: rgba(247, 239, 228, 0.72);
}

.aside-user-avatar {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--color-secondary);
  color: #fff;
  font-weight: 900;
}

.aside-user-text {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.aside-user-text strong,
.aside-user-text small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aside-user-text small {
  color: var(--color-text-muted);
  font-size: 12px;
}

.aside-nav {
  display: grid;
  gap: var(--space-4);
}

.aside-nav-group {
  display: grid;
  gap: var(--space-2);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(216, 200, 179, 0.72);
}

.aside-nav-label {
  padding: 0 var(--space-3);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.aside-nav-group:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

body[data-theme='dark'] .aside-nav-group {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.aside-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.aside-nav a:hover,
.aside-nav a[aria-current='page'] {
  background: rgba(255, 94, 91, 0.1);
  color: var(--color-primary-text);
}

.settings-logout-form .btn {
  width: 100%;
}

.bottom-navigation-shell {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 860;
  width: min(calc(100% - 24px), 620px);
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}

.bottom-navigator {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-1);
  padding: 8px;
  border: 1px solid rgba(216, 200, 179, 0.92);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.96);
  box-shadow: 0 12px 34px rgba(26, 27, 58, 0.14);
  backdrop-filter: blur(18px);
  overflow: visible;
}

.bottom-nav-item {
  min-width: 0;
  min-height: 48px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border-radius: 999px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
}

.bottom-nav-icon {
  font-size: 17px;
  line-height: 1;
}

.bottom-nav-energy-orb {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .76);
  background: radial-gradient(circle at 28% 20%, rgba(255, 255, 255, .92), rgba(255, 255, 255, .18) 27%, rgba(62, 84, 108, .22) 100%);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, .82), inset 0 -8px 14px rgba(38, 53, 77, .25), 0 10px 18px rgba(26, 27, 58, .26), 0 0 0 4px rgba(255, 250, 242, .72);
  isolation: isolate;
}

.bottom-nav-energy {
  position: relative;
  width: 56px;
  min-height: 56px;
  overflow: visible;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  isolation: isolate;
}

.bottom-nav-energy::before {
  position: absolute;
  top: -9px;
  right: 6px;
  left: 6px;
  z-index: 0;
  height: 43px;
  border: 1px solid rgba(216, 200, 179, .94);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 238, 191, .9), rgba(201, 160, 83, .27));
  content: none;
}

.bottom-nav-energy-liquid {
  position: absolute;
  right: -12px;
  bottom: -8px;
  left: -12px;
  z-index: 1;
  height: var(--energy-level, 50%);
  min-height: 0;
  border-radius: 42% 48% 0 0;
  background: radial-gradient(circle at 25% 18%, rgba(255, 255, 255, .76) 0 3%, transparent 4%), linear-gradient(145deg, #ff947c, #ff5e5b 48%, #d64258);
  box-shadow: inset 0 9px 12px rgba(255, 210, 178, .34), inset 0 -7px 12px rgba(145, 20, 57, .28);
  opacity: var(--energy-liquid-opacity, 1);
  transform: translate(var(--energy-sway-x, 0), var(--energy-sway-y, 0)) rotate(var(--energy-tilt, 0deg));
  transform-origin: center bottom;
  transition: height .55s ease, transform .18s ease-out;
}

.bottom-nav-energy-liquid::before {
  position: absolute;
  top: -7px;
  right: -6px;
  left: -6px;
  height: 13px;
  border-radius: 50%;
  background: rgba(255, 221, 202, .78);
  box-shadow: 20px 2px 0 rgba(255, 149, 124, .45), -18px 2px 0 rgba(255, 149, 124, .45);
  content: '';
  animation: energy-liquid-wave 2.6s ease-in-out infinite alternate;
}

.bottom-nav-energy:not(.is-energy-hydrated) .bottom-nav-energy-liquid,
.bottom-nav-energy:not(.is-energy-hydrated) .bottom-nav-energy-bubbles {
  visibility: hidden;
}

.bottom-nav-energy:not(.is-energy-ready) .bottom-nav-energy-liquid {
  transition: none;
}

.bottom-nav-energy.is-energy-hydrated .bottom-nav-energy-orb {
  animation: energy-orb-breathe 3.8s ease-in-out infinite;
}

.bottom-nav-energy.is-energy-hydrated .bottom-nav-energy-liquid::before,
.bottom-nav-energy.is-energy-hydrated .bottom-nav-energy-bubbles i {
  animation-play-state: running;
}

.bottom-nav-energy-orb strong {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  color: #fff;
  border-radius: 999px;
  background: rgba(26, 27, 58, .72);
  padding: 3px 5px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(76, 25, 47, .55);
  transform: translate(-50%, -50%);
}

.bottom-nav-energy-bubbles { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.bottom-nav-energy-bubbles i { position: absolute; bottom: 9px; width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .68); animation: energy-bubble 3.2s ease-in infinite; }
.bottom-nav-energy-bubbles i:nth-child(1) { left: 16px; animation-delay: -.4s; }
.bottom-nav-energy-bubbles i:nth-child(2) { left: 35px; width: 3px; height: 3px; animation-delay: -1.7s; }
.bottom-nav-energy-bubbles i:nth-child(3) { left: 27px; width: 4px; height: 4px; animation-delay: -2.5s; }

.bottom-nav-energy-glare {
  position: absolute;
  z-index: 4;
  top: 9px;
  left: 13px;
  width: 23px;
  height: 11px;
  border-radius: 50%;
  border-top: 3px solid rgba(255, 255, 255, .72);
  transform: rotate(-36deg);
}

@keyframes energy-liquid-wave { from { transform: translateX(-3px) scaleX(.92); } to { transform: translateX(3px) scaleX(1.07); } }
@keyframes energy-bubble { 0% { opacity: 0; transform: translateY(0) scale(.6); } 22% { opacity: .82; } 100% { opacity: 0; transform: translateY(-41px) translateX(7px) scale(1.25); } }
@keyframes energy-orb-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }

@media (prefers-reduced-motion: reduce) {
  .bottom-nav-energy-liquid,
  .bottom-nav-energy-orb,
  .bottom-nav-energy-liquid::before,
  .bottom-nav-energy-bubbles i { animation: none; transition: none; }
}

.bottom-nav-energy[aria-current='page'] .bottom-nav-energy-orb {
  box-shadow: inset 0 0 10px rgba(255, 255, 255, .82), inset 0 -8px 14px rgba(38, 53, 77, .25), 0 10px 18px rgba(26, 27, 58, .26), 0 0 0 5px rgba(255, 94, 91, .26);
}

.bottom-nav-item:hover,
.bottom-nav-item[aria-current='page'] {
  background: rgba(255, 94, 91, 0.12);
  color: var(--color-primary-text);
}

.bottom-nav-energy:hover,
.bottom-nav-energy[aria-current='page'] {
  background: transparent;
}

.page-floating-action {
  position: fixed;
  right: max(18px, calc((100vw - 1080px) / 2 + 18px));
  bottom: max(104px, calc(env(safe-area-inset-bottom) + 104px));
  z-index: 840;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  padding: 0 20px;
  box-shadow: 0 12px 28px rgba(229, 74, 71, .3);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.page-floating-action:hover { background: var(--color-primary-strong); }
.page-floating-action:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }

.daily-floating-action {
  position: fixed;
  left: 50%;
  bottom: max(96px, calc(env(safe-area-inset-bottom) + 96px));
  z-index: 850;
  width: min(calc(100% - 32px), 430px);
  transform: translateX(-50%);
  box-shadow: 0 14px 30px rgba(53, 89, 224, .28);
}

.compact-header-action {
  width: auto;
  min-height: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

@media (hover: none) {
  .bottom-nav-energy[data-ui-tooltip]::after { display: none; }
}

.retrospect-detail-sheet [data-detail-panel][hidden] { display: none; }
.retrospect-table-energy { color: var(--color-text-muted); font-size: 11px; font-weight: 900; white-space: nowrap; }
.retrospect-schedule-table th:nth-child(4), .retrospect-schedule-table td:nth-child(4) { width: 118px; }
.retrospect-schedule-table th:nth-child(5), .retrospect-schedule-table td:nth-child(5) { width: 72px; text-align: right; }

body.is-menu-open, body.is-header-search-open {
  overflow: hidden;
}

body.is-ui-open {
  overflow: hidden;
}

.page {
  width: min(100%, 680px);
}

.page-title {
  margin: 0 0 var(--space-4);
  font-size: clamp(22px, 2.6vw, var(--font-size-xl));
  line-height: 1.3;
}

.card,
.section {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 26px rgba(26, 27, 58, 0.06);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}

.auth-page {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: var(--space-8) var(--space-4) var(--space-6);
}

.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 28px rgba(26, 27, 58, 0.08);
  padding: var(--space-6) var(--space-5);
}

.auth-title {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-xl);
}

.auth-subtitle {
  margin: 0 0 var(--space-5);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.form {
  display: grid;
  gap: var(--space-4);
}

.form-group {
  display: grid;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--color-control-line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 250, 242, 0.82));
  color: var(--color-text);
  padding: 0 var(--space-3);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

textarea.input {
  padding-block: 12px;
  line-height: 1.6;
}

input.input {
  appearance: none;
}

.input::placeholder {
  color: #98a2b3;
  font-weight: 600;
}

body[data-theme='dark'] .input {
  border-color: var(--color-control-line);
  background: linear-gradient(180deg, rgba(49, 51, 43, 0.96), rgba(36, 37, 31, 0.92));
  color: var(--color-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body[data-theme='dark'] .input::placeholder {
  color: rgba(189, 181, 168, 0.72);
}

body[data-theme='dark'] select.input option {
  background: var(--color-surface);
  color: var(--color-text);
}

.input:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 1px;
  border-color: var(--color-primary);
}

.input.is-error {
  border-color: #f97066;
  background: #fffafa;
}

body[data-theme='dark'] .input.is-error {
  border-color: #ff8c82;
  background: rgba(58, 38, 35, 0.72);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.checkbox-row input[type='checkbox'] {
  margin-top: 2px;
}

.checkbox-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  padding: 0 var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}

.btn-primary:hover { background: var(--color-primary-strong); }

.btn-secondary {
  background: rgba(26, 27, 58, 0.04);
  color: var(--color-secondary);
  border-color: rgba(26, 27, 58, 0.18);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.28);
  color: var(--color-text-muted);
  border-color: var(--color-line);
}

body[data-theme='dark'] .btn-secondary {
  background: rgba(244, 210, 122, 0.1);
  color: var(--color-secondary);
  border-color: rgba(244, 210, 122, 0.24);
}

body[data-theme='dark'] .btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text-muted);
  border-color: rgba(255, 255, 255, 0.14);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.msg {
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: var(--font-size-sm);
}

.msg-success {
  background: var(--color-success-bg);
  border-color: #cfe2c6;
  color: var(--color-success-text);
}

.msg-info {
  background: var(--color-info-bg);
  border-color: #dfd2b8;
  color: var(--color-info-text);
}

.msg-error {
  background: var(--color-danger-bg);
  border-color: #efc7bf;
  color: var(--color-danger-text);
}

.field-error {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-danger-text);
}

.helper-text,
.muted {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-line);
}

.list li:last-child { border-bottom: 0; }

.link {
  color: var(--color-primary-text);
  text-decoration: none;
  font-weight: 600;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.placeholder-card {
  border: 1px dashed rgba(26, 27, 58, 0.2);
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
  padding: var(--space-4);
  min-height: 88px;
}

.eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-hero {
  display: grid;
  gap: var(--space-4);
}

.dashboard-hero h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-lg);
}

.dashboard-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.dashboard-menu-card {
  display: grid;
  gap: var(--space-2);
  color: inherit;
  text-decoration: none;
}

.action-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

@media (min-width: 640px) {
  .auth-card { padding: var(--space-8) var(--space-6); }
  .dashboard-hero {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .action-row {
    flex-direction: row;
    align-items: center;
  }
}

@media (min-width: 768px) {
  .app-shell.has-app-chrome {
    padding-bottom: 104px;
  }

  .site-header-inner,
  .site-footer-inner,
  .page {
    width: min(100%, 920px);
  }

  .bottom-navigation-shell { width: min(calc(100% - 24px), 588px); }
}

@media (max-width: 767px) {
  .has-app-chrome .site-brand { max-width: 96px; }
  .daily-primary-page .site-header.is-daily-primary-header:not(.is-search-open) { display: none; }
  .daily-primary-page .site-header.is-daily-primary-header.is-search-open {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1200;
  }
  .daily-primary-page .site-header.is-search-open .site-brand,
  .daily-primary-page .site-header.is-search-open .site-header-guidance,
  .daily-primary-page .site-header.is-search-open .site-header-actions { display: none; }
  .daily-primary-page .site-header.is-search-open .site-header-inner { display: block; }
  .daily-context-actions { display: flex; }
  .daily-date-context { margin: calc(var(--space-4) * -1) calc(var(--space-4) * -1) 0; padding: max(4px, env(safe-area-inset-top)) 8px 4px; }
}

@media (min-width: 1024px) {
  .site-header-inner,
  .site-footer-inner,
  .page {
    width: min(100%, 1080px);
  }

  .app-aside {
    width: 360px;
  }
}


.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--color-line);
}

.auth-link-text {
  margin: var(--space-4) 0 0;
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.social-login-stack {
  position: relative;
  margin-top: var(--space-1);
}

.social-login-bubble {
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  background: rgba(26, 27, 58, 0.95);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  z-index: 2;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.social-login-bubble::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid rgba(26, 27, 58, 0.95);
}

.btn-social {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.social-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--color-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 479px) {
  .social-login-bubble {
    top: -16px;
    font-size: 12px;
    padding: 7px 14px;
  }
}

body[data-theme='dark'] .site-header,
body[data-theme='dark'] .site-footer,
body[data-theme='dark'] .app-aside,
body[data-theme='dark'] .bottom-navigator,
body[data-theme='dark'] .card,
body[data-theme='dark'] .section {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(36, 37, 31, 0.94);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.duration-highlight {
  background: linear-gradient(
    transparent 56%,
    color-mix(in srgb, var(--color-primary) 24%, transparent) 56% 91%,
    transparent 91%
  );
  padding-inline: 2px;
}

body[data-theme='dark'] .duration-highlight {
  background: linear-gradient(
    transparent 54%,
    color-mix(in srgb, var(--color-primary) 34%, transparent) 54% 92%,
    transparent 92%
  );
}
