/* ANGEL HOME v2 — Y2K software windows, silver handheld shell, cyber-pixel details */
html[data-shell="angel-white"] #home-page {
  --home-ink: #343d47;
  --home-muted: #7c8995;
  --home-line: rgba(91, 115, 132, .28);
  --home-line-soft: rgba(105, 129, 145, .15);
  --home-white: rgba(253, 254, 255, .92);
  --home-glass: rgba(244, 248, 250, .76);
  --home-cyan: #cce8ed;
  --home-shadow: rgba(71, 91, 105, .11);
  background:
    radial-gradient(circle at 92% 5%, rgba(188, 224, 232, .42), transparent 27%),
    radial-gradient(circle at 4% 48%, rgba(217, 214, 235, .3), transparent 31%),
    linear-gradient(158deg, #fbfcfd 0%, #edf2f5 55%, #e5eaee 100%);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

html[data-shell="angel-white"] #home-page .home-scroll {
  flex: none;
  min-height: 100%;
  height: auto;
  width: min(100%, 700px);
  margin-inline: auto;
  box-sizing: border-box;
  gap: 11px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 22px;
  overflow: visible;
}

/* top handheld / cover screen */
html[data-shell="angel-white"] .home-cover-shell {
  position: relative;
  padding: 7px 7px 13px;
  border: 1px solid var(--home-line);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(221,229,234,.94));
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(91,112,126,.1), 0 10px 26px var(--home-shadow);
}

html[data-shell="angel-white"] .home-cover {
  position: relative;
  min-height: 218px;
  overflow: hidden;
  border: 1px solid rgba(70, 91, 106, .35);
  border-radius: 19px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #dce5ea;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.54);
}

html[data-shell="angel-white"] .home-cover::before,
html[data-shell="angel-white"] .home-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

html[data-shell="angel-white"] .home-cover::before {
  background:
    linear-gradient(180deg, rgba(238,245,248,.16) 0 46%, rgba(45,56,66,.3) 100%),
    radial-gradient(ellipse at 76% 24%, rgba(203,232,238,.8), transparent 38%),
    radial-gradient(ellipse at 18% 78%, rgba(220,217,235,.65), transparent 48%),
    linear-gradient(135deg, #eef3f5, #cbd5dc);
  z-index: 0;
}

html[data-shell="angel-white"] .home-cover-shell.has-cover .home-cover::before {
  background: linear-gradient(180deg, rgba(15,21,26,.12), rgba(15,20,25,.34));
}

html[data-shell="angel-white"] .home-cover::after {
  z-index: 1;
  opacity: .36;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.09) 0 1px, transparent 1px 4px);
}

html[data-shell="angel-white"] .home-cover-empty {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  color: rgba(78, 96, 108, .62);
  text-align: center;
}

html[data-shell="angel-white"] .home-cover-empty span {
  font: 600 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .22em;
}

html[data-shell="angel-white"] .home-cover-empty small { font-size: 11px; }
html[data-shell="angel-white"] .home-cover-shell.has-cover .home-cover-empty { display: none; }

html[data-shell="angel-white"] .home-cover .home-top {
  position: absolute;
  z-index: 4;
  inset: 0;
  min-height: 0;
  padding: 12px;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: none;
  box-shadow: none;
  align-items: flex-start;
}

html[data-shell="angel-white"] .home-cover .home-weather,
html[data-shell="angel-white"] .home-cover .home-days {
  color: #27313a;
  text-shadow: 0 1px 2px rgba(255,255,255,.5);
}

html[data-shell="angel-white"] .home-cover-shell.has-cover :is(.home-weather,.home-days-date,.home-days-count,.home-days-unit) {
  color: #fff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,.72);
}

html[data-shell="angel-white"] .home-cover .home-weather {
  gap: 5px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-shell="angel-white"] .home-cover .home-weather-icon {
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 400;
  font-variant-emoji: text;
  line-height: 1;
}
html[data-shell="angel-white"] .home-cover .home-weather-temp { font-size: 13px; }
html[data-shell="angel-white"] .home-cover-shell.has-cover :is(.home-weather-temp,#weather-desc) {
  color: #fff !important;
}

html[data-shell="angel-white"] .home-cover .home-days {
  position: absolute;
  top: 12px;
  right: 52px;
  min-width: auto;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-shell="angel-white"] .home-days-line { display: flex; align-items: baseline; justify-content: flex-end; gap: 3px; }
html[data-shell="angel-white"] .home-cover .home-days-count { font-size: 21px; font-weight: 400; letter-spacing: -.04em; }
html[data-shell="angel-white"] .home-days-unit { color: var(--home-muted); font-size: 10px; }
html[data-shell="angel-white"] .home-cover .home-days-date { font-size: 9px; }

html[data-shell="angel-white"] .home-cover .home-more-btn {
  top: 12px;
  right: 12px;
  width: 33px;
  height: 33px;
  color: #4e606b;
  border-color: rgba(87,111,126,.3);
  background: rgba(247,250,252,.65);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

html[data-shell="angel-white"] .home-cover-controls {
  position: absolute;
  z-index: 4;
  left: 12px;
  bottom: 48px;
  display: flex;
  align-items: center;
  gap: 5px;
}

html[data-shell="angel-white"] :is(.home-cover-btn,.home-cover-clear) {
  border: 1px solid rgba(255,255,255,.28);
  color: #32404a;
  background: rgba(247,250,252,.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font: inherit;
  cursor: pointer;
}

html[data-shell="angel-white"] .home-cover-shell.has-cover :is(.home-cover-btn,.home-cover-clear) { color: #fff; background: rgba(18,25,31,.35); }
html[data-shell="angel-white"] .home-cover-btn { height: 28px; padding: 0 9px; border-radius: 9px; font-size: 10px; }
html[data-shell="angel-white"] .home-cover-clear { display: none; width: 28px; height: 28px; padding: 0; border-radius: 50%; font-size: 17px; }
html[data-shell="angel-white"] .home-cover-shell.has-cover .home-cover-controls { display: none; }
html[data-shell="angel-white"] .home-cover-shell.has-cover .home-cover { cursor: pointer; }

html[data-shell="angel-white"] .home-cover-shell .home-note {
  position: relative;
  z-index: 5;
  margin: -38px 9px 0;
  padding: 10px 11px;
  border-radius: 16px !important;
  background: rgba(249,252,253,.83) !important;
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.94), 0 9px 22px rgba(67,86,99,.13) !important;
}

html[data-shell="angel-white"] .home-note-arrow { margin-left: auto; color: var(--home-muted); font-size: 22px; }

/* reusable old-software windows */
html[data-shell="angel-white"] .home-desktop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(0, .87fr);
  gap: 9px;
  align-items: stretch;
}

html[data-shell="angel-white"] .software-window {
  min-width: 0;
  overflow: hidden;
  padding: 0 !important;
  border: 1px solid var(--home-line) !important;
  border-radius: 15px !important;
  background: rgba(248,250,251,.78) !important;
  box-shadow: inset 0 1px 0 #fff, 0 6px 17px rgba(72,92,106,.075) !important;
}

html[data-shell="angel-white"] .window-titlebar {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  color: #eef5f7;
  background: linear-gradient(180deg, #171b1f, #070809);
  border-bottom: 1px solid rgba(255,255,255,.2);
  font: 500 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .09em;
}

html[data-shell="angel-white"] .window-titlebar::after {
  content: "";
  flex: 1;
  align-self: stretch;
  opacity: .16;
  background: repeating-linear-gradient(0deg, transparent 0 2px, #fff 2px 3px);
}

html[data-shell="angel-white"] .window-play { color: #fff; font-size: 9px; }
html[data-shell="angel-white"] .window-status { order: 4; color: #9fb0ba; letter-spacing: .05em; }

html[data-shell="angel-white"] .week-wrap .week-header { margin: 0; padding: 8px 9px 5px; border: 0; }
html[data-shell="angel-white"] .week-wrap .week-strip { gap: 2px; padding: 2px 7px 9px; }
html[data-shell="angel-white"] .home-month-weekday {
  padding: 2px 0 4px;
  color: var(--home-muted);
  text-align: center;
  font: 500 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
html[data-shell="angel-white"] .home-month-empty { min-height: 25px; }
html[data-shell="angel-white"] .week-wrap .week-day { min-height: 25px; padding: 0; border-radius: 7px; }
html[data-shell="angel-white"] .week-wrap .week-day-number { width: 24px; height: 24px; font-size: 10px; }
html[data-shell="angel-white"] .week-wrap .week-day.period { background: rgba(220,100,120,.14); }
html[data-shell="angel-white"] .week-wrap .week-day.period-predict { border: 1px dashed rgba(220,100,120,.28); }
html[data-shell="angel-white"] .week-wrap .week-day.has-entry::after { bottom: 1px; width: 3px; height: 3px; }
html[data-shell="angel-white"] .week-wrap :is(.week-title,.week-open) { font-size: 10px; }

/* notes are always visible, like a tiny text file */
html[data-shell="angel-white"] #panel-memo.home-memo-window {
  display: flex !important;
  flex-direction: column;
  max-height: 220px;
  overflow: visible;
  padding: 2px 1px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-shell="angel-white"] #panel-memo .home-panel-list {
  flex: 1;
  gap: 7px;
  min-height: 70px;
  overflow-y: auto;
  padding: 9px 9px 5px;
}

html[data-shell="angel-white"] #panel-memo .home-panel-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  gap: 2px;
  padding: 10px 9px 9px;
  overflow: hidden;
  border: 0;
  border-radius: 2px 2px 7px 2px;
  background: linear-gradient(145deg, rgba(250,252,253,.98), rgba(222,237,241,.82));
  box-shadow: 0 3px 7px rgba(66,84,96,.11), inset 0 1px 0 rgba(255,255,255,.9);
  font-size: 10px;
  line-height: 1.35;
}

html[data-shell="angel-white"] #panel-memo .home-panel-item:nth-child(even) {
  transform: rotate(.65deg);
  background: linear-gradient(145deg, rgba(252,251,253,.98), rgba(232,225,241,.82));
}

html[data-shell="angel-white"] #panel-memo .home-panel-item:nth-child(odd) { transform: rotate(-.45deg); }

html[data-shell="angel-white"] #panel-memo .home-panel-item::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, rgba(134,158,172,.13) 0 49%, rgba(255,255,255,.82) 51%);
}

html[data-shell="angel-white"] #panel-memo .memo-copy {
  min-width: 0;
}
html[data-shell="angel-white"] #panel-memo .memo-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  cursor: pointer;
}
html[data-shell="angel-white"] #panel-memo .home-panel-item.expanded .memo-text {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}
html[data-shell="angel-white"] #panel-memo .memo-meta {
  display: block;
  margin-top: 4px;
  padding-right: 2px;
  overflow: hidden;
  color: rgba(91,112,126,.62);
  font: 500 7px/1.2 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: .04em;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-shell="angel-white"] #panel-memo .memo-empty {
  margin: auto;
  padding: 16px 8px;
  color: var(--home-muted);
  font-size: 10px;
  text-align: center;
}
html[data-shell="angel-white"] #panel-memo .home-panel-add { gap: 4px; margin: 2px 7px 0; padding: 0; border: 0; }
html[data-shell="angel-white"] #panel-memo .home-panel-add input { min-width: 0; padding: 5px 6px; font-size: 9px; }
html[data-shell="angel-white"] #panel-memo .home-panel-add button { padding: 4px 8px; }

/* TODAY.TXT */
html[data-shell="angel-white"] .home-primary-card .window-titlebar { border-radius: 14px 14px 0 0; }
html[data-shell="angel-white"] .home-primary-card {
  width: 100%;
  margin-inline: 0;
  min-height: 300px;
}
html[data-shell="angel-white"] .home-primary-card #panel-todo { display: block !important; padding: 0 10px 10px; }
html[data-shell="angel-white"] .home-primary-card .todo-filters {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin: 0 -1px 8px;
  padding-top: 8px;
  border-bottom: 1px solid var(--home-line-soft);
}

html[data-shell="angel-white"] .home-primary-card .todo-compose-toggle {
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  margin: 0 0 4px auto;
  padding: 0;
  border: 1px solid var(--home-line);
  border-radius: 8px;
  color: #51636e;
  background: rgba(249,252,253,.84);
  font: 400 19px/1 system-ui, sans-serif;
}
html[data-shell="angel-white"] .home-primary-card .todo-compose-toggle.active {
  color: #263942;
  background: var(--home-cyan);
}

html[data-shell="angel-white"] .home-primary-card #todo-list {
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
  touch-action: auto;
}

html[data-shell="angel-white"] .home-primary-card .todo-filter {
  min-width: 72px;
  padding: 7px 12px 6px;
  border-radius: 8px 8px 0 0;
  border-bottom: 0;
  font-size: 11px;
}

html[data-shell="angel-white"] .home-primary-card .todo-filter.active {
  position: relative;
  transform: translateY(1px);
  color: #31444e;
  background: #fbfdfe;
}

html[data-shell="angel-white"] .home-primary-card .todo-group-title::after {
  content: "";
  height: 1px;
  background: rgba(105,129,145,.1);
}

html[data-shell="angel-white"] .home-primary-card .home-panel-item {
  position: relative;
  padding: 8px 2px;
  border-bottom: 0;
}

html[data-shell="angel-white"] .home-primary-card .home-panel-item.done { text-decoration-thickness: 1px; }
html[data-shell="angel-white"] .home-primary-card input[type="checkbox"] { width: 15px; height: 15px; border-radius: 0; }
html[data-shell="angel-white"] .home-primary-card .todo-add-fields { display: none; padding-top: 2px; }
html[data-shell="angel-white"] .home-primary-card .todo-add-fields.open { display: grid; }

html[data-shell="angel-white"] .home-secondary-cards { display: flex; align-items: center; gap: 7px; }
html[data-shell="angel-white"] .home-secondary-cards .home-kk-button {
  flex: 0 0 43px;
  min-width: 43px;
  width: 43px;
  height: 34px;
  padding: 6px 8px;
  display: inline-grid;
  place-items: center;
  font: 600 10px/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: .08em;
}
html[data-shell="angel-white"] .home-utility-actions { margin-left: auto; display: flex; justify-content: flex-end; }

/* mobile secret door — intentionally quiet */
html[data-shell="angel-white"] #home-utility-actions #dignity-casino-entry {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 0;
  width: auto;
  padding: 7px 10px;
  border: 1px solid rgba(91,115,132,.22);
  border-radius: 9px;
  color: #697985;
  background: rgba(246,249,251,.62);
  box-shadow: inset 0 1px 0 #fff;
  font-size: 10px;
}

html[data-shell="angel-white"] #home-utility-actions #dignity-casino-entry::before,
html[data-shell="angel-white"] #home-utility-actions #dignity-casino-entry::after { display: none; }
html[data-shell="angel-white"] #home-utility-actions .dignity-entry-open,
html[data-shell="angel-white"] #home-utility-actions .dignity-entry-sign,
html[data-shell="angel-white"] #home-utility-actions .dignity-entry-line { all: unset; }
html[data-shell="angel-white"] #home-utility-actions .dignity-entry-open,
html[data-shell="angel-white"] #home-utility-actions .dignity-entry-zh,
html[data-shell="angel-white"] #home-utility-actions .dignity-entry-line { display: none; }
html[data-shell="angel-white"] #home-utility-actions .dignity-entry-en { all: unset; }

@media (max-width: 380px) {
  html[data-shell="angel-white"] .home-desktop-grid { grid-template-columns: 1fr; }
  html[data-shell="angel-white"] #panel-memo.home-memo-window { max-height: 240px; }
  html[data-shell="angel-white"] .week-wrap .week-day-number { width: 29px; height: 29px; font-size: 12px; }
  html[data-shell="angel-white"] .week-wrap .week-day { min-height: 30px; }
  html[data-shell="angel-white"] .home-primary-card .todo-filter { flex: 1; min-width: 0; padding-inline: 6px; }
  html[data-shell="angel-white"] .home-primary-card .todo-compose-toggle { flex: 0 0 31px; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-shell="angel-white"] #home-page * { scroll-behavior: auto !important; }
}
