/* ─── App Shell ─── */
.app-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* ─── Topbar ─── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gap-lg);
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.topbar-title {
  font-size: var(--font-lg);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.topbar-title span {
  color: var(--red-mid);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-now {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-sm);
  color: rgba(255,255,255,0.75);
}

.topbar-now .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ADE80;
  animation: pulse 2s infinite;
}

.topbar-attach-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.topbar-attach-btn:active {
  background: rgba(255,255,255,0.22);
  transform: scale(0.94);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ─── Day Tabs ─── */
:root {
  --tab-h: 84px;
}

.day-tabs {
  position: fixed;
  top: var(--topbar-h);
  left: 0; right: 0;
  height: var(--tab-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  overflow-x: auto;
  overflow-y: hidden;
  z-index: 90;
  scrollbar-width: none;
}
.day-tabs::-webkit-scrollbar { display: none; }

/* ─── Day Tab Card ─── */
.day-tab {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 72px;
  height: 62px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  position: relative;
}

.day-tab:active {
  transform: scale(0.95);
}

.day-tab-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--ink3);
  text-transform: uppercase;
}

.day-tab-date {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink2);
  line-height: 1;
}

.day-tab-weekday {
  font-size: 10px;
  color: var(--ink3);
  letter-spacing: 0.03em;
}

.day-tab-today-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4ADE80;
  margin-top: 2px;
}

/* Active Tab */
.day-tab--active {
  background: var(--ink);
  border-color: var(--ink);
}

.day-tab--active .day-tab-label  { color: rgba(255,255,255,0.5); }
.day-tab--active .day-tab-date   { color: #ffffff; }
.day-tab--active .day-tab-weekday { color: rgba(255,255,255,0.5); }
.day-tab--active .day-tab-today-dot { background: #4ADE80; }

/* ─── Main Content ─── */
.main {
  margin-top: calc(var(--topbar-h) + var(--tab-h));
  padding: var(--gap-lg) var(--gap);
  width: 100%;
  max-width: 480px;
  padding-bottom: 80px;
}

/* ─── Day Header ─── */
.day-header {
  margin-bottom: var(--gap-lg);
  padding-bottom: var(--gap);
  border-bottom: 1px solid var(--border);
}

.day-header-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.day-header-theme {
  font-size: var(--font-2xl);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.day-header-date {
  font-size: var(--font-sm);
  color: var(--ink3);
  margin-top: 4px;
}

/* ─── Bottom Sheet ─── */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  display: flex;
  align-items: flex-end;
}

.sheet-panel {
  width: 100%;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding-bottom: env(safe-area-inset-bottom, 16px);
  overflow: hidden;
}

.sheet-handle-wrap {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}

.sheet-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px 10px;
  border-bottom: 1px solid var(--surface2);
}

.sheet-header-icon {
  font-size: 16px;
}

.sheet-header-title {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink3);
  text-transform: uppercase;
}

.sheet-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--ink3);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  -webkit-tap-highlight-color: transparent;
}

.sheet-list {
  overflow-y: auto;
  max-height: 55vh;
}

.sheet-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--surface);
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}

.sheet-item:last-child { border-bottom: none; }

.sheet-item:active {
  background: var(--surface2);
}

.sheet-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sheet-item-text { flex: 1; min-width: 0; }

.sheet-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-item-url {
  font-size: 11px;
  color: var(--ink3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-item-arrow {
  font-size: 16px;
  color: var(--ink3);
  flex-shrink: 0;
}

/* ─── Sheet Transitions ─── */
.sheet-fade-enter-active,
.sheet-fade-leave-active {
  transition: opacity 0.25s ease;
}
.sheet-fade-enter-from,
.sheet-fade-leave-to {
  opacity: 0;
}

.sheet-slide-enter-active,
.sheet-slide-leave-active {
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.sheet-slide-enter-from,
.sheet-slide-leave-to {
  transform: translateY(100%);
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
  .topbar { padding: 0 var(--gap); }
  .main { padding: var(--gap) 12px 80px; }
}
