/* Shared page layout for TangzhenBB pages. Colours, type and components come from /brand/brand.css. */

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; }
.skip:focus { left: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background var(--tg-fast) var(--tg-ease), border-color var(--tg-fast) var(--tg-ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(27, 36, 48, 0.72);
  backdrop-filter: blur(var(--tg-blur)); -webkit-backdrop-filter: blur(var(--tg-blur));
  border-bottom-color: var(--tg-glass-edge);
}
.site-header .tg-header { gap: var(--tg-space-4); }
.site-nav { display: flex; align-items: center; gap: var(--tg-space-3); }
.site-nav__link { color: var(--tg-text-muted); font-size: var(--tg-size-sm); padding: 6px 4px; }
.site-nav__link:hover { color: var(--tg-text); text-decoration: none; }
.site-nav__btn { padding: 7px 14px; }
@media (max-width: 640px) { .site-nav__link { display: none; } }

/* ---------- Hero with video ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  overflow: hidden; isolation: isolate; background: var(--tg-base);
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media video, .hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__media video { opacity: 0; transition: opacity 1.2s var(--tg-ease); }
.hero__media video.is-playing { opacity: 1; }
.hero__shade { position: absolute; inset: 0; z-index: -1; background: rgba(27, 36, 48, 0.58); }
.hero__fade { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: -1; background: var(--tg-base); opacity: .55; mask-image: linear-gradient(to top, #000, transparent); -webkit-mask-image: linear-gradient(to top, #000, transparent); }
.hero__content { padding: 140px 0 96px; max-width: 720px; }
.hero__title { font-size: clamp(2.5rem, 7vw, 4.5rem); line-height: 1.04; letter-spacing: -0.03em; margin-bottom: var(--tg-space-4); }
.hero__text { font-size: clamp(1rem, 2.2vw, 1.2rem); color: var(--tg-text-muted); max-width: 520px; margin-bottom: var(--tg-space-5); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--tg-space-3); }
.hero__scroll {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  font-size: var(--tg-size-xs); color: var(--tg-text-muted); letter-spacing: .08em;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero__scroll::after { content: ""; width: 1px; height: 28px; background: var(--tg-accent); animation: scrollcue 2.4s var(--tg-ease) infinite; transform-origin: top; }
@keyframes scrollcue { 0% { transform: scaleY(0); opacity: 1 } 60% { transform: scaleY(1); opacity: 1 } 100% { transform: scaleY(1); opacity: 0 } }
@media (max-width: 640px) { .hero__scroll { display: none; } }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--tight { padding: 56px 0; }
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--tg-space-4); margin-bottom: var(--tg-space-5); }
.section__title { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.02em; margin-bottom: var(--tg-space-2); }
.chips { display: flex; flex-wrap: wrap; gap: var(--tg-space-2); }

/* ---------- Tool cards ---------- */
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: var(--tg-space-3);
  min-height: 210px; color: var(--tg-text); text-decoration: none;
  transition: transform var(--tg-fast) var(--tg-ease), border-color var(--tg-fast) var(--tg-ease), background var(--tg-fast) var(--tg-ease);
}
a.tool-card:hover { transform: translateY(-3px); border-color: rgba(201, 180, 154, 0.55); background: var(--tg-surface-2); text-decoration: none; }
.tool-card__top { display: flex; align-items: center; justify-content: space-between; }
.tool-card__name { font-size: 1.1rem; font-weight: var(--tg-weight-medium); margin: 0; }
.tool-card__desc { color: var(--tg-text-muted); font-size: var(--tg-size-sm); margin: 0; flex: 1; }
.tool-card__cta { display: inline-flex; align-items: center; gap: 6px; font-size: var(--tg-size-sm); color: var(--tg-accent); }
.tool-card.is-soon { opacity: .78; }
.tag { font-size: var(--tg-size-xs); color: var(--tg-text-muted); border: 1px solid var(--tg-glass-edge); border-radius: var(--tg-radius-pill); padding: 3px 10px; }
.tag--accent { color: var(--tg-accent); border-color: rgba(201, 180, 154, 0.45); }
.tg-icon-tile svg { width: 20px; height: 20px; }
.empty { color: var(--tg-text-muted); padding: var(--tg-space-5) 0; }

/* ---------- Features ---------- */
.features { display: grid; gap: var(--tg-space-3); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature { padding: var(--tg-space-5) var(--tg-space-4); border-top: 1px solid var(--tg-line); }
.feature h3 { margin-top: var(--tg-space-3); }
.feature p { color: var(--tg-text-muted); font-size: var(--tg-size-sm); margin: 0; }

/* ---------- Lab teaser ---------- */
.lab-teaser {
  position: relative; overflow: hidden; display: grid; gap: var(--tg-space-5);
  grid-template-columns: 1fr auto; align-items: center;
  padding: clamp(28px, 5vw, 56px); border-radius: 22px;
  background: var(--tg-surface); border: 1px solid rgba(201, 180, 154, 0.35);
}
.lab-teaser__orb { position: absolute; width: 320px; height: 320px; right: -80px; top: -120px; border-radius: 50%; background: var(--tg-accent); opacity: .14; filter: blur(60px); pointer-events: none; }
.lab-teaser__grid { position: relative; width: 96px; height: 96px; }
@media (max-width: 640px) { .lab-teaser { grid-template-columns: 1fr; } .lab-teaser__grid { display: none; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--tg-line); padding: var(--tg-space-6) 0; color: var(--tg-text-muted); font-size: var(--tg-size-sm); }
.site-footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--tg-space-4); align-items: center; }
.site-footer a { color: var(--tg-text-muted); }
.site-footer a:hover { color: var(--tg-text); }

/* ---------- Inner pages (lab, admin) ---------- */
.page { padding: 120px 0 80px; min-height: 80vh; }
.page__head { margin-bottom: var(--tg-space-6); }
.table { width: 100%; border-collapse: collapse; font-size: var(--tg-size-sm); }
.table th, .table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--tg-line); }
.table th { color: var(--tg-text-muted); font-weight: var(--tg-weight-regular); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--tg-ease), transform .7s var(--tg-ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Centred brand hero ---------- */
.hero--center { min-height: 88svh; align-items: center; justify-content: center; text-align: center; }
.hero--center .hero__content { padding: 120px 16px 80px; max-width: none; }
.hero__brand { font-size: clamp(3rem, 11vw, 7.5rem); line-height: 1; letter-spacing: -0.04em; margin: 0 0 var(--tg-space-3); }
.hero__sub { font-size: clamp(1.05rem, 2.6vw, 1.5rem); color: var(--tg-text-muted); margin: 0; letter-spacing: -0.01em; }
.hero__scroll { text-decoration: none; }
.hero__scroll:hover { color: var(--tg-text); text-decoration: none; }

/* ---------- Big tool tiles (app launcher) ---------- */
.tile-grid { display: grid; gap: var(--tg-space-4); grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
@media (max-width: 520px) { .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tg-space-3); } }
.tool-tile {
  position: relative; aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--tg-space-4);
  padding: var(--tg-space-4); text-align: center; color: var(--tg-text); text-decoration: none;
  background: var(--tg-glass); border: 1px solid var(--tg-glass-edge); border-radius: 22px;
  backdrop-filter: blur(var(--tg-blur)); -webkit-backdrop-filter: blur(var(--tg-blur));
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1), background var(--tg-fast) var(--tg-ease), border-color var(--tg-fast) var(--tg-ease);
  will-change: transform;
}
.tool-tile:hover, .tool-tile:focus-visible { transform: scale(1.06); background: var(--tg-glass-hover); border-color: rgba(201, 180, 154, 0.55); text-decoration: none; }
.tool-tile:active { transform: scale(1.02); }
.tool-tile__icon {
  width: 72px; height: 72px; border-radius: 20px; display: flex; align-items: center; justify-content: center;
  background: var(--tg-glass-tint); color: var(--tg-accent);
}
.tool-tile__icon svg { width: 36px; height: 36px; }
.tool-tile__name { font-size: 1rem; font-weight: var(--tg-weight-medium); line-height: 1.3; }
.tool-tile__soon { position: absolute; top: 12px; right: 12px; font-size: 11px; color: var(--tg-accent); border: 1px solid rgba(201, 180, 154, 0.45); border-radius: var(--tg-radius-pill); padding: 2px 8px; }
.tool-tile.is-soon { cursor: default; }
.tool-tile.is-soon .tool-tile__icon, .tool-tile.is-soon .tool-tile__name { opacity: .7; }
@media (prefers-reduced-motion: reduce) { .tool-tile:hover { transform: none; } }

/* Poster sits behind the video so an image shows instantly, even before the video plays */
.hero__media { background: var(--tg-base) url("/poster.jpg") center / cover no-repeat; }
.tg-btn { white-space: nowrap; }
@media (max-width: 520px) { .site-nav .tg-btn [data-icon] { display: none !important; } .site-nav { gap: 8px; } }
.hero__shade { background: rgba(27, 36, 48, 0.64); }
.hero__fade { height: 220px; opacity: 1; }
.hero__sub { color: rgba(236, 229, 216, 0.86); }

/* ---------- Lab: favourites ---------- */
.lab-section { margin-bottom: 56px; }
.lab-section__title { font-size: 1.15rem; margin-bottom: var(--tg-space-4); }
.fav-hint { font-size: var(--tg-size-sm); }
.fav-note { font-size: var(--tg-size-sm); color: var(--tg-accent); margin-bottom: var(--tg-space-3); }
.tile-grid--favs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .tile-grid--favs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 12px; margin: -8px -4px 0; }
  .tile-grid--favs .tile-wrap { flex: 0 0 150px; scroll-snap-align: start; }
}
.tile-wrap { position: relative; }
.tile-wrap .tool-tile { width: 100%; }
.tool-tile__fav {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--tg-text-muted);
  cursor: pointer; transition: color var(--tg-fast) var(--tg-ease), background var(--tg-fast) var(--tg-ease), transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tool-tile__fav svg { width: 18px; height: 18px; }
.tool-tile__fav:hover { color: var(--tg-text); background: var(--tg-glass-hover); transform: scale(1.1); }
.tool-tile__fav.is-on { color: var(--tg-accent); }
.tool-tile__fav.is-on svg { fill: currentColor; }
.tile-wrap:hover .tool-tile { transform: scale(1.06); background: var(--tg-glass-hover); border-color: rgba(201, 180, 154, 0.55); }
[hidden] { display: none !important; }

/* ---------- Lab: greeting + name form ---------- */
.greet { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0; }
.greet__edit { margin-left: 12px; }
.greet__name { font-weight: var(--tg-weight-regular); }
.greet__edit {
  align-self: center; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--tg-glass-edge); background: var(--tg-glass); color: var(--tg-text-muted); cursor: pointer;
}
.greet__edit:hover { color: var(--tg-text); background: var(--tg-glass-hover); }
.greet__edit svg { width: 16px; height: 16px; }
.name-form { margin-top: var(--tg-space-4); max-width: 560px; }
.name-form label { display: block; font-size: var(--tg-size-sm); margin-bottom: var(--tg-space-2); }
.name-form__row { display: flex; flex-wrap: wrap; gap: var(--tg-space-2); }
.name-form__row .tg-input { flex: 1 1 220px; }
.name-form .tg-error { margin: var(--tg-space-2) 0 0; }

/* ---------- Privacy page ---------- */
.privacy { max-width: 760px; }
.privacy__intro { font-size: 1.05rem; }
.privacy__actions { margin-bottom: var(--tg-space-6); }
.privacy__actions h2 { font-size: 1.1rem; }
.privacy__buttons { display: flex; flex-wrap: wrap; gap: var(--tg-space-2); margin-bottom: var(--tg-space-3); }
.privacy__hint { font-size: var(--tg-size-sm); margin: 0; }
.privacy__status { margin: var(--tg-space-3) 0 0; font-size: var(--tg-size-sm); color: var(--tg-success); }
.privacy__status.tg-error { color: var(--tg-danger); }
.privacy__section { padding: var(--tg-space-4) 0; border-top: 1px solid var(--tg-line); }
.privacy__section h2 { font-size: 1.05rem; margin-bottom: var(--tg-space-2); }
.privacy__section p, .privacy__section li { color: var(--tg-text-muted); font-size: var(--tg-size-sm); line-height: 1.7; }
.privacy__section ul { margin: 0; padding-left: 1.2em; }
.privacy__updated { font-size: var(--tg-size-xs); margin-top: var(--tg-space-4); }
.btn-icon { display: inline-flex; width: 16px; height: 16px; }
.btn-icon svg { width: 16px; height: 16px; }

/* ---------- Account: avatar + menu in the header ---------- */
.account { position: relative; display: flex; }
.account__avatar, .avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden; padding: 0;
  background: var(--tg-glass-tint); border: 1px solid var(--tg-glass-edge);
  color: var(--tg-accent); font: inherit; font-weight: var(--tg-weight-medium); font-size: 0.95rem;
  backdrop-filter: blur(var(--tg-blur)); -webkit-backdrop-filter: blur(var(--tg-blur));
}
.account__avatar { cursor: pointer; transition: transform var(--tg-fast) var(--tg-ease), border-color var(--tg-fast) var(--tg-ease); }
.account__avatar:hover, .account__avatar[aria-expanded="true"] { border-color: var(--tg-accent); }
.account__avatar:active { transform: scale(0.95); }
.account__avatar img, .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar--xl { width: 96px; height: 96px; font-size: 2.2rem; }

.account__menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 50; min-width: 220px;
  padding: 6px; border-radius: 16px;
  background: rgba(36, 48, 65, 0.92); border: 1px solid var(--tg-glass-edge);
  backdrop-filter: blur(var(--tg-blur)); -webkit-backdrop-filter: blur(var(--tg-blur));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.account__who { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--tg-line); }
.account__name { font-weight: var(--tg-weight-medium); }
.account__email { color: var(--tg-text-muted); font-size: var(--tg-size-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.account__item { display: block; padding: 9px 12px; border-radius: 10px; color: var(--tg-text); font-size: var(--tg-size-sm); }
.account__item:hover, .account__item:focus-visible { background: var(--tg-glass-hover); text-decoration: none; outline: none; }
.account__item--out { color: var(--tg-text-muted); margin-top: 4px; border-top: 1px solid var(--tg-line); border-radius: 0 0 10px 10px; }
.account__item--narrow { display: none; }
@media (max-width: 640px) { .account__item--narrow { display: block; } }
.site-nav__link[aria-current="page"] { color: var(--tg-text); }

/* ---------- Profile / settings page ---------- */
.profile { max-width: 640px; }
.profile__card { margin-bottom: var(--tg-space-4); }
.profile__card h2 { font-size: 1.1rem; margin-bottom: var(--tg-space-4); }
.profile__pic-row { display: flex; align-items: center; gap: var(--tg-space-5); flex-wrap: wrap; }
.profile__pic-actions { display: flex; gap: var(--tg-space-2); flex-wrap: wrap; }
.profile__hint { font-size: var(--tg-size-sm); margin: var(--tg-space-4) 0 0; }
.profile__status { margin: var(--tg-space-3) 0 0; font-size: var(--tg-size-sm); color: var(--tg-success); }
.profile__status.tg-error { color: var(--tg-danger); }
.profile__line { font-size: var(--tg-size-sm); }
.profile__email { color: var(--tg-text); }
.profile__buttons { display: flex; gap: var(--tg-space-2); flex-wrap: wrap; margin-top: var(--tg-space-3); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.lab-section { scroll-margin-top: 90px; }

/* ---------- Admin: storage usage bars ---------- */
.usage { margin-bottom: var(--tg-space-6); }
.usage__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--tg-space-2); margin-bottom: var(--tg-space-4); }
.usage__head h2 { margin: 0; }
.usage__updated { font-size: var(--tg-size-xs); color: var(--tg-text-muted); }
.usage__legend { display: flex; flex-wrap: wrap; gap: var(--tg-space-2) var(--tg-space-4); font-size: var(--tg-size-xs); color: var(--tg-text-muted); margin-bottom: var(--tg-space-3); }
.usage__legend .usage__marks { margin-left: auto; }
.usage__swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.usage__bars { display: grid; gap: var(--tg-space-3); }
.usage-bar { padding: 0; overflow: hidden; }
.usage-bar__toggle {
  display: block; width: 100%; text-align: left; font: inherit; color: inherit;
  background: none; border: 0; padding: var(--tg-space-4); cursor: pointer;
  transition: background var(--tg-fast) var(--tg-ease);
}
.usage-bar__toggle:hover { background: var(--tg-glass); }
.usage-bar__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--tg-space-2); margin-bottom: var(--tg-space-3); }
.usage-bar__name { display: inline-flex; align-items: center; gap: var(--tg-space-2); font-weight: var(--tg-weight-medium); }
.usage-bar__name svg, .usage-bar__total svg, .usage-bar__state svg { width: 18px; height: 18px; flex: none; }
.usage-bar__name svg { color: var(--tg-accent); }
.usage-bar__total { display: inline-flex; align-items: center; gap: var(--tg-space-2); font-size: var(--tg-size-sm); color: var(--tg-text-muted); }
.usage-bar__total svg { transition: transform var(--tg-fast) var(--tg-ease); }
.usage-bar.is-open .usage-bar__total svg:last-child { transform: rotate(180deg); }
.usage-bar__pct { color: var(--tg-text); font-weight: var(--tg-weight-medium); }
.usage-bar__state { display: inline-flex; align-items: center; gap: 4px; font-size: var(--tg-size-xs); color: var(--tg-accent); }
.usage-bar__state.is-high { color: var(--tg-danger); }
.usage-bar__track { position: relative; display: flex; height: 16px; border-radius: var(--tg-radius-pill); background: var(--tg-glass); border: 1px solid var(--tg-glass-edge); overflow: hidden; }
.usage-bar__seg { height: 100%; transition: width .6s var(--tg-ease); }
.usage-bar__seg + .usage-bar__seg { box-shadow: -1px 0 0 var(--tg-surface); }
.usage-bar__mark { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--tg-glass-edge); }
.usage-bar__mark--stop { background: var(--tg-danger); opacity: .8; }
.usage-bar__details { border-top: 1px solid var(--tg-line); padding: var(--tg-space-3) var(--tg-space-4) var(--tg-space-4); font-size: var(--tg-size-sm); }
.usage-row { display: flex; justify-content: space-between; gap: var(--tg-space-3); padding: 5px 0; }
.usage-row span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.usage-row--muted { color: var(--tg-text-muted); }
.usage-row + .usage-row--sep { border-top: 1px solid var(--tg-line); margin-top: 6px; padding-top: 11px; }
.usage__note { font-size: var(--tg-size-xs); color: var(--tg-text-muted); margin: var(--tg-space-2) 0 0; }
@media (max-width: 520px) {
  .usage__legend .usage__marks { margin-left: 0; width: 100%; }
  .usage-bar__toggle { padding: var(--tg-space-3); }
  .usage-bar__details { padding: var(--tg-space-3); }
}
.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; }
.page__title { margin-bottom: var(--tg-space-5); }
.usage[hidden] { display: none; }
.usage__more { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--tg-space-3); font-size: var(--tg-size-sm); }
.usage__more svg { width: 16px; height: 16px; }
.usage__note--warn { color: var(--tg-danger); }

/* ---------- Admin: warnings ---------- */
.alerts__card { display: grid; gap: var(--tg-space-4); }
.alerts__card h2 { margin-bottom: 0; }
.alerts__card[hidden] { display: none; }
#admin-settings { scroll-margin-top: 90px; }
.alerts__rule { font-size: var(--tg-size-sm); color: var(--tg-text-muted); margin: 0; }
.alerts__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--tg-space-3); }
.alerts__label { margin: 0; font-weight: var(--tg-weight-medium); }
.alerts__state { margin: 0; font-size: var(--tg-size-sm); }
.alerts__actions { display: flex; flex-wrap: wrap; gap: var(--tg-space-2); border-top: 1px solid var(--tg-line); padding-top: var(--tg-space-4); }
.alerts__msg { margin: 0; font-size: var(--tg-size-sm); color: var(--tg-success); }
.alerts__msg.is-error { color: var(--tg-danger); }
.alerts__remove { justify-self: start; font: inherit; font-size: var(--tg-size-xs); color: var(--tg-text-muted); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.alerts__remove[hidden] { display: none; }
.alerts__remove:hover { color: var(--tg-danger); }

/* ---------- Admin settings: households ---------- */
.houses[hidden] { display: none; }
.houses__intro { font-size: var(--tg-size-sm); }
.houses__list { display: grid; gap: var(--tg-space-3); margin-bottom: var(--tg-space-4); }
.house { border: 1px solid var(--tg-line); border-radius: var(--tg-radius-sm); padding: var(--tg-space-3); }
.house__head { display: flex; align-items: center; justify-content: space-between; gap: var(--tg-space-2); margin-bottom: var(--tg-space-2); }
.house__name { font-weight: var(--tg-weight-medium); }
.house__tools { display: flex; gap: var(--tg-space-1); }
.house__people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.house__person { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--tg-space-2); font-size: var(--tg-size-sm); }
.house__who { min-width: 0; overflow-wrap: anywhere; }
.house__who small { display: block; color: var(--tg-text-muted); font-size: var(--tg-size-xs); }
.house__actions { display: flex; align-items: center; gap: var(--tg-space-2); }
.house__empty { font-size: var(--tg-size-sm); color: var(--tg-text-muted); margin: 0; }
.house--unassigned { border-style: dashed; }
.house__select { width: auto; padding: 6px 8px; font-size: var(--tg-size-xs); }
.link-btn { font: inherit; font-size: var(--tg-size-xs); color: var(--tg-text-muted); background: none; border: 0; padding: 2px 4px; cursor: pointer; text-decoration: underline; }
.link-btn:hover { color: var(--tg-text); }
.link-btn--danger:hover { color: var(--tg-danger); }
.houses__form { margin-top: var(--tg-space-3); }
.houses__label { display: block; font-size: var(--tg-size-sm); color: var(--tg-text-muted); margin-bottom: 6px; }
.houses__row { display: flex; flex-wrap: wrap; gap: var(--tg-space-2); }
.houses__row .tg-input { flex: 1 1 200px; width: auto; }
.houses__row .houses__select { flex: 0 1 180px; }
.houses__msg { margin: var(--tg-space-3) 0 0; font-size: var(--tg-size-sm); color: var(--tg-success); }
.houses__msg.is-error { color: var(--tg-danger); }
@media (max-width: 520px) {
  .house__person { flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--tg-line); }
  .house__person:last-child { border-bottom: 0; padding-bottom: 0; }
}

/* Admin "Settings" link under the tool name (admins only) */
.tile-wrap--settings .tool-tile { padding-bottom: 48px; }
.tool-tile__settings {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 2; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--tg-text-muted);
  background: var(--tg-glass); border: 1px solid var(--tg-glass-edge); border-radius: var(--tg-radius-pill); padding: 3px 10px;
}
.tool-tile__settings svg { width: 13px; height: 13px; }
.tool-tile__settings:hover { color: var(--tg-text); background: var(--tg-glass-hover); text-decoration: none; }
.page__head--tight { margin-bottom: var(--tg-space-5); }
.houses { max-width: 720px; }
.tool-tile__lock { display: inline-flex; align-items: center; gap: 4px; }
.tool-tile__lock svg { width: 11px; height: 11px; }

/* Dashboard: storage as one compact row of three small tiles */
.usage--compact { margin-bottom: var(--tg-space-5); }
.usage--compact .usage__head { margin-bottom: var(--tg-space-2); }
.usage--compact .usage__head h2 { font-size: var(--tg-size-sm); color: var(--tg-text-muted); font-weight: var(--tg-weight-medium); }
.usage--compact .usage__legend:empty { display: none; }
.usage--compact .usage__bars { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--tg-space-2); max-width: 640px; }
.usage-mini {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  padding: 10px 12px; color: var(--tg-text); text-decoration: none;
  transition: background var(--tg-fast) var(--tg-ease), border-color var(--tg-fast) var(--tg-ease);
}
.usage-mini:hover { text-decoration: none; background: var(--tg-surface-2); }
.usage-mini__name { display: flex; align-items: center; gap: 6px; font-size: var(--tg-size-xs); color: var(--tg-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usage-mini__name svg { width: 14px; height: 14px; flex: none; color: var(--tg-accent); }
.usage-mini__pct { font-size: 1.05rem; font-weight: var(--tg-weight-medium); line-height: 1.1; font-variant-numeric: tabular-nums; }
.usage-mini__track { height: 6px; }
.usage-mini__sub { font-size: 0.6875rem; color: var(--tg-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.usage-mini__sub--state { color: var(--tg-accent); }
.usage-mini__sub--state.is-high { color: var(--tg-danger); }

/* A card frame: hidden while its app has nothing to show */
.dash-item { position: relative; }
.dash-item:has(> section[hidden]):not(.is-dragging) { display: none; }

/* Edit mode */
.dash-bar { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.dash-hint { font-size: var(--tg-size-xs); max-width: 300px; text-align: right; }
.dash-editing .dash-item { padding: 44px 10px 10px; margin-bottom: var(--tg-space-4); border: 1px dashed rgba(201, 180, 154, 0.5); border-radius: 22px; background: rgba(236, 229, 216, 0.02); }
.dash-editing .dash-item > section { pointer-events: none; user-select: none; margin-bottom: 0; }
.dash-editing .dash-item:focus-visible { outline: 2px solid var(--tg-accent); outline-offset: 2px; }
.dash-editing .dash-item { cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.dash-item.is-dragging { cursor: grabbing; }
.dash-editing .dash-item:has(> section[hidden]) { display: block; }
.dash-editing .dash-item:has(> section[hidden]) > section { display: none; }
.dash-editing .dash-item.dash-off { display: block !important; opacity: .5; }
.dash-editing .dash-item.dash-off > section { display: none; }
.dash-ctl { position: absolute; top: 6px; left: 14px; right: 8px; display: flex; align-items: center; gap: 6px; z-index: 3; }
.dash-ctl__name { flex: 1; min-width: 0; font-size: var(--tg-size-xs); color: var(--tg-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-ctl__btn { width: 32px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0; border-radius: 50%;
  border: 1px solid var(--tg-glass-edge); background: var(--tg-glass); color: var(--tg-text); cursor: pointer; }
.dash-ctl__btn svg { width: 16px; height: 16px; }
.dash-ctl__btn:hover { background: var(--tg-glass-hover); }
.dash-ctl__grip { cursor: grab; touch-action: none; color: var(--tg-accent); }
.dash-item.is-dragging { position: fixed; z-index: 60; margin: 0; pointer-events: none; opacity: .92; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); background: var(--tg-surface); }
.dash-ph { border: 2px dashed var(--tg-accent); border-radius: 22px; margin-bottom: var(--tg-space-4); background: var(--tg-glass-tint); }
@media (max-width: 640px) { .dash-hint { text-align: left; max-width: none; } }

/* Same width for "Sign in" and "Anmelden", so the language switch never moves */
.account__signin { min-width: 8.5rem; justify-content: center; }

/* Dashboard greeting date */
.greet__date { margin: 6px 0 0; color: var(--tg-text-muted); font-size: var(--tg-size-sm); }
/* Short description under the tool name */
.tool-tile__desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 4px; font-size: var(--tg-size-xs); line-height: 1.4; color: var(--tg-text-muted); text-align: center; }
/* Phone, signed in: language switch moves into the avatar menu */
.account__lang { display: none; margin: 6px 12px 8px; width: max-content; }
@media (max-width: 640px) {
  .site-nav.has-account > .tg-lang { display: none; }
  .account__lang { display: inline-flex; }
}

/* Tool tiles: every tile in a row has the same height. A tile grows with its text,
   and the others in the row follow; icons line up at the same height. */
.tile-wrap { display: flex; flex-direction: column; }
.tile-wrap .tool-tile { flex: 1 1 auto; justify-content: flex-start; padding-top: var(--tg-space-5); }
.tile-grid > .tool-tile { justify-content: flex-start; padding-top: var(--tg-space-5); }

/* Dashboard: customise which cards are shown */
.greet__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--tg-space-3); margin-top: 6px; }
.greet__row .greet__date { margin: 0; }
.dash-edit { padding: 6px 14px; font-size: var(--tg-size-xs); }
.dash-off { display: none !important; }
.dash-list { display: grid; gap: 2px; margin: var(--tg-space-4) 0; }
.dash-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px var(--tg-space-3); padding: 10px 4px; border-bottom: 1px solid var(--tg-line); }
.dash-row:last-child { border-bottom: 0; }
.dash-row__name { display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1 1 140px; min-width: 0; }
.dash-row__name svg { width: 18px; height: 18px; color: var(--tg-accent); }
.tg-switch { position: relative; width: 44px; height: 26px; flex: none; }
.tg-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.tg-switch span { position: absolute; inset: 0; border-radius: var(--tg-radius-pill); background: var(--tg-glass); border: 1px solid var(--tg-glass-edge); transition: background var(--tg-fast) var(--tg-ease); pointer-events: none; }
.tg-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--tg-text-muted); transition: transform var(--tg-fast) var(--tg-ease), background var(--tg-fast) var(--tg-ease); }
.tg-switch input:checked + span { background: var(--tg-glass-accent); border-color: transparent; }
.tg-switch input:checked + span::after { transform: translateX(18px); background: var(--tg-on-accent); }
.tg-switch input:focus-visible + span { outline: 2px solid var(--tg-accent); outline-offset: 2px; }
.dash-empty { margin: var(--tg-space-4) 0; }

.dash-row__ctl { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.dash-size { display: inline-flex; padding: 2px; border-radius: var(--tg-radius-pill); background: var(--tg-glass); border: 1px solid var(--tg-glass-edge); margin-right: 4px; }
.dash-size button { font: inherit; font-size: var(--tg-size-xs); color: var(--tg-text-muted); background: none; border: 0; border-radius: var(--tg-radius-pill); padding: 4px 10px; cursor: pointer; }
.dash-size button[aria-pressed="true"] { background: var(--tg-glass-accent); color: var(--tg-on-accent); }
.dash-move { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--tg-glass-edge); background: var(--tg-glass); color: var(--tg-text); cursor: pointer; padding: 0; }
.dash-move svg { width: 16px; height: 16px; }
.dash-move:disabled { opacity: .3; cursor: default; }
.dash-move:not(:disabled):hover { background: var(--tg-glass-hover); }

/* Address suggestions (combobox, /assets/address.js) */
.tg-addr { position: relative; }
.tg-addr > .tg-input { width: 100%; box-sizing: border-box; }
.tg-addr__list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; max-height: 320px; overflow-y: auto;
  background: var(--tg-surface-2); border: 1px solid var(--tg-accent-edge); border-radius: var(--tg-radius-sm); box-shadow: var(--tg-shadow-float); }
.tg-addr__list li { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 6px; cursor: pointer; }
.tg-addr__list li:hover, .tg-addr__list li[aria-selected="true"] { background: var(--tg-glass-hover); }
.tg-addr__street { font-weight: var(--tg-weight-medium); }
.tg-addr__exact { font-style: normal; font-size: var(--tg-size-xs); color: var(--tg-success); margin-left: 4px; }
.tg-addr__place { font-size: var(--tg-size-sm); color: var(--tg-text-muted); }
.tg-addr__place small { font-size: var(--tg-size-xs); color: var(--tg-accent); margin-left: 4px; }
.tg-addr__note { margin: 4px 0 0; font-size: var(--tg-size-xs); color: var(--tg-text-muted); }
.tg-addr__note:empty { display: none; }

/* ==========================================================================
   Signed-in layout (concept A): side menu, header picture, "Today" grid, shortcuts.
   Pages opt in with <body class="has-sidebar"> + assets/sidebar.js. See docs/apps/dashboard.md.
   ========================================================================== */
.has-sidebar { background: var(--tg-base-deep); }
.has-sidebar main { background: linear-gradient(180deg, var(--tg-main-top) 0, var(--tg-main-top) 380px, var(--tg-main-bottom) 1100px, var(--tg-base) 100%); min-height: 100vh; } /* flat behind the header picture, so its fade has no seam */

/* Phones: the header stays on top with a solid background, so it never covers the picture. */
.has-sidebar .site-header { position: sticky; background: var(--tg-base-deep); }

/* Side menu (wide screens) */
.sidebar { display: none; }
@media (min-width: 960px) {
  .has-sidebar .site-header { display: none; }
  /* The main area runs underneath the menu, so the header picture shows behind the menu's round corners. */
  .has-sidebar main { padding-left: 248px; }
  .sidebar { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 248px; z-index: 30;
    padding: 20px 12px 14px; background: var(--tg-base-deep); border-radius: 0 28px 28px 0; overflow-y: auto;
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.25); }
}
.sidebar__logo { padding: 2px 10px 20px; }
.sidebar__nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar__link { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px;
  color: var(--tg-text-muted); font-size: var(--tg-size-sm); transition: background var(--tg-fast) var(--tg-ease), color var(--tg-fast) var(--tg-ease); }
.sidebar__link svg { width: 18px; height: 18px; flex: none; color: var(--tg-accent); }
.sidebar__link:hover, .sidebar__link:focus-visible { background: var(--tg-glass); color: var(--tg-text); text-decoration: none; }
.sidebar__link.is-here { background: var(--tg-glass-hover); color: var(--tg-text); }
.sidebar__link.is-soon { opacity: .6; }
.sidebar__soon { margin-left: auto; font-size: 10px; color: var(--tg-accent); }
.sidebar__head { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 14px; padding: 6px 10px;
  background: none; border: 0; cursor: pointer; font: inherit; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--tg-text-muted); border-radius: 8px; }
.sidebar__head:hover { color: var(--tg-text); }
.sidebar__head svg { width: 14px; height: 14px; transition: transform var(--tg-fast) var(--tg-ease); }
.sidebar__head[aria-expanded="false"] svg { transform: rotate(-90deg); }
.sidebar__items { display: flex; flex-direction: column; gap: 2px; }
.sidebar__all { margin-top: 14px; }
.sidebar__row { position: relative; }
.sidebar__row .sidebar__link { padding-right: 38px; }
.sidebar__star { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: none; color: var(--tg-text-muted); cursor: pointer; opacity: 0;
  transition: opacity var(--tg-fast) var(--tg-ease), color var(--tg-fast) var(--tg-ease), background var(--tg-fast) var(--tg-ease); }
.sidebar__star svg { width: 15px; height: 15px; }
.sidebar__row:hover .sidebar__star, .sidebar__star:focus-visible, .sidebar__star.is-on { opacity: 1; }
.sidebar__star:hover { color: var(--tg-text); background: var(--tg-glass-hover); }
.sidebar__star.is-on { color: var(--tg-accent); }
.sidebar__star.is-on svg { fill: currentColor; }
.sidebar__group--favs .sidebar__star.is-on { opacity: 0; }
.sidebar__group--favs .sidebar__row:hover .sidebar__star { opacity: 1; }
.sidebar__hint { margin: 2px 10px 4px; font-size: var(--tg-size-xs); color: var(--tg-text-muted); }
@media (hover: none) { .sidebar__star { opacity: 1; } .sidebar__group--favs .sidebar__star.is-on { opacity: 1; } }
.sidebar__foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 6px 0; border-top: 1px solid var(--tg-line); }
.sidebar__name { flex: 1; min-width: 0; font-size: var(--tg-size-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__account .account__menu { top: auto; bottom: calc(100% + 10px); left: 0; right: auto; }

/* Tab bar (phones) */
.tabbar { display: none; }
@media (max-width: 959px) {
  .has-sidebar { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; justify-content: space-around; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); background: rgba(18, 24, 33, 0.94); border-top: 1px solid var(--tg-line);
    backdrop-filter: blur(var(--tg-blur)); -webkit-backdrop-filter: blur(var(--tg-blur)); }
  .has-sidebar .site-footer { padding-bottom: 24px; }
}
.tabbar__tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; background: none; border: 0;
  font: inherit; font-size: 10px; color: var(--tg-text-muted); cursor: pointer; }
.tabbar__tab svg { width: 22px; height: 22px; }
.tabbar__tab.is-here, .tabbar__tab[aria-expanded="true"] { color: var(--tg-accent); }
.tabbar__tab:hover { text-decoration: none; color: var(--tg-text); }
.tabbar__sheet { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 8px); padding: 8px; border-radius: 18px;
  background: rgba(36, 48, 65, 0.97); border: 1px solid var(--tg-glass-edge); box-shadow: var(--tg-shadow-float); }
.tabbar__title { margin: 6px 10px 6px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--tg-text-muted); }
.tabbar__sheet .sidebar__link { padding: 12px 10px; font-size: var(--tg-size-md); color: var(--tg-text); }

/* Header picture: the Cologne photo from border to border (on wide screens also behind the rounded
   corner of the side menu). It fades into the page blue; greeting and weather sit below the fade. */
.dash-hero { --sky-h: clamp(210px, 25vw, 360px); position: relative; padding-top: calc(var(--sky-h) - 15px); }
.dash-hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--sky-h);
  background: var(--tg-base) var(--dash-sky, url("/brand/skyline/cologne-photo.jpg")) center 70% / cover no-repeat; }
.dash-hero::after { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--sky-h) * 0.5); height: calc(var(--sky-h) * 0.5 + 2px);
  background: linear-gradient(180deg, rgba(38, 50, 74, 0) 0%, rgba(38, 50, 74, 0.55) 48%, var(--tg-main-top) 88%, var(--tg-main-top) 100%); }
/* Wide screens: the picture also runs under the side menu, so its round top corner shows the sky, not blue. */
@media (min-width: 960px) {
  .dash-hero::before, .dash-hero::after { left: -248px; }
  /* Height follows the width, so the whole photo fits next to the menu (3.62 = the photo's width / height).
     The photo sits right of the menu (no building hides behind it); under the menu the same photo
     fills in, so the menu's round corner shows sky. */
  .dash-hero { --sky-h: clamp(220px, calc((100vw - 248px) / 3.4), 380px); }
  .dash-hero::before { background:
      var(--dash-sky, url("/brand/skyline/cologne-photo.jpg")) right 70% / max(calc(100% - 248px), calc(var(--sky-h) * 3.62)) auto no-repeat,
      var(--tg-base) var(--dash-sky, url("/brand/skyline/cologne-photo.jpg")) left 70% / cover no-repeat; }
}
@media (max-width: 700px) { .dash-hero::before { background-image: var(--dash-sky, url("/brand/skyline/cologne-photo-small.jpg")); background-position: 85% 70%; } } /* phones: keep the Dom in view */
.dash-hero__in { position: relative; z-index: 1; max-width: 1200px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 clamp(16px, 4vw, 56px); }
.dash-hero .greet { margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: var(--tg-weight-regular); letter-spacing: -0.01em; }
.dash-hero .greet__name { color: var(--tg-text); }
.dash-hero .greet__date { color: var(--tg-text-muted); margin-top: 4px; font-size: var(--tg-size-sm); }
.dash-hero .greet__edit { width: 28px; height: 28px; opacity: .6; }
.dash-hero .greet__edit:hover { opacity: 1; }
.weather { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; color: var(--tg-text); flex: none;
  background: rgba(236, 229, 216, 0.06); border: 1px solid var(--tg-glass-edge); backdrop-filter: blur(var(--tg-blur)); -webkit-backdrop-filter: blur(var(--tg-blur)); position: relative; }
.weather:hover { text-decoration: none; background: rgba(236, 229, 216, 0.14); }
.weather__icon svg { width: 30px; height: 30px; color: var(--tg-accent); display: block; }
.weather__text { display: flex; flex-direction: column; }
.weather__temp { font-size: 1.3rem; font-weight: var(--tg-weight-medium); line-height: 1.1; }
.weather__sub { font-size: var(--tg-size-xs); color: var(--tg-text-muted); }
.weather__src { position: absolute; right: 8px; top: 6px; font-size: 9px; letter-spacing: .04em; color: var(--tg-text-muted); opacity: .7; }
@media (max-width: 640px) {
  .dash-hero { --sky-h: 190px; }
  .dash-hero__in { flex-direction: column; align-items: flex-start; gap: 12px; }
  .weather { padding: 8px 12px; } .weather__temp { font-size: 1.2rem; } .weather__icon svg { width: 24px; height: 24px; }
}

/* Content */
.dash-body { max-width: 1200px; padding: 30px clamp(16px, 4vw, 56px) 40px; }
.dash-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: var(--tg-space-4); }
.dash-head__title { margin: 0; font-size: var(--tg-size-md); font-weight: var(--tg-weight-medium); color: var(--tg-text-muted); }
.dash-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--tg-radius-pill); background: none; border: 0;
  font: inherit; font-size: var(--tg-size-xs); color: var(--tg-text-muted); cursor: pointer; }
.dash-link svg { width: 14px; height: 14px; }
.dash-link:hover, .dash-link[aria-pressed="true"] { color: var(--tg-text); background: var(--tg-glass); }
.dash-editing #dash-edit { color: var(--tg-on-accent); background: var(--tg-glass-accent); }

/* "Today" grid: small card = 1 column, large = 2 */
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row dense; gap: var(--tg-space-4); align-items: start; margin-bottom: 40px; }
.dash-grid > .usage { grid-column: 1 / -1; margin-bottom: 0; }
.dash-grid > .dash-item[data-size="large"] { grid-column: span 2; }
.dash-grid > .dash-item > .lab-section { margin-bottom: 0; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 699px) { .dash-grid { grid-template-columns: minmax(0, 1fr); gap: var(--tg-space-3); } .dash-grid > .dash-item[data-size="large"] { grid-column: auto; } }
.dash-editing .dash-grid > .dash-item { margin-bottom: 0; }
.dash-ph { margin-bottom: 0; }

/* Your shortcuts */
.shortcuts .dash-head__title { margin-bottom: var(--tg-space-4); }
.shortcuts__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--tg-space-3); }
@media (max-width: 520px) { .shortcuts__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shortcut { display: flex; flex-direction: column; gap: 8px; min-height: 120px; padding: 16px; border-radius: 18px; color: var(--tg-text);
  background: rgba(236, 229, 216, 0.05); border: 1px solid rgba(236, 229, 216, 0.1);
  transition: transform var(--tg-fast) var(--tg-ease), background var(--tg-fast) var(--tg-ease), border-color var(--tg-fast) var(--tg-ease); }
.shortcut:hover, .shortcut:focus-visible { text-decoration: none; background: var(--tg-glass-hover); border-color: var(--tg-accent-edge); transform: translateY(-2px); }
.shortcut__head { display: flex; align-items: center; gap: 10px; }
.shortcut__icon { width: 36px; height: 36px; flex: none; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--tg-glass); color: var(--tg-accent); }
.shortcut__icon svg { width: 19px; height: 19px; }
.shortcut__name { font-weight: var(--tg-weight-medium); }
.shortcut__value { font-size: 1.1rem; font-weight: var(--tg-weight-medium); }
.shortcut__sub { font-size: var(--tg-size-sm); color: var(--tg-text-muted); }
.shortcut--add { align-items: center; justify-content: center; border-style: dashed; color: var(--tg-text-muted); font-size: var(--tg-size-sm); }
.shortcut--add svg { width: 20px; height: 20px; }
@media (prefers-reduced-motion: reduce) { .shortcut:hover { transform: none; } }

/* Footer inside the main area */
.dash-footer { padding: 24px clamp(16px, 4vw, 56px); max-width: 1200px; border-top: 1px solid rgba(236, 229, 216, 0.06); }
.dash-footer .site-footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* Settings button inside an app (admins only, assets/site.js renderAppSettings) */
.site-nav__settings { display: inline-flex; align-items: center; gap: 6px; }
.site-nav__settings svg { width: 16px; height: 16px; }
@media (max-width: 520px) { .site-nav__settings span:last-child { display: none; } .site-nav__settings { padding: 7px 10px; } .site-nav .tg-btn.site-nav__settings [data-icon] { display: inline-flex !important; } }
