:root {
  color-scheme: dark;
  --bg: #07101f;
  --panel: rgba(17, 28, 46, 0.78);
  --panel-strong: #111c2e;
  --panel-soft: #0b1220;
  --line: #26364d;
  --line-soft: rgba(138, 160, 184, 0.16);
  --text: #eef6ff;
  --muted: #8fa3bb;
  --accent: #b7f7d4;
  --accent-strong: #69e9aa;
  --danger: #ff7c9b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(circle at 20% -10%, rgba(105, 233, 170, 0.24), transparent 32rem),
    radial-gradient(circle at 110% 10%, rgba(80, 128, 255, 0.18), transparent 28rem),
    var(--bg);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.phone-shell {
  position: relative;
  width: min(100%, 480px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px calc(98px + env(safe-area-inset-bottom));
}

.screen {
  animation: rise 420ms ease both;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.topbar.compact {
  justify-content: flex-start;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 8vw, 3.1rem);
  letter-spacing: -0.07em;
  line-height: 0.92;
}

.overline,
.hero-kicker {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.icon-button,
.delete-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(20, 34, 56, 0.78);
  color: var(--text);
}

.hero-card,
.add-panel,
.placeholder-panel,
.settings-list,
.tare-card,
.section-card {
  border: 1px solid var(--line-soft);
  background: linear-gradient(145deg, rgba(17, 28, 46, 0.9), rgba(8, 17, 33, 0.82));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  margin-bottom: 28px;
  padding: 24px;
  border-radius: 34px;
}

.hero-card h2 {
  max-width: 12ch;
  margin-bottom: 14px;
  font-size: clamp(2.15rem, 12vw, 4rem);
  letter-spacing: -0.08em;
  line-height: 0.9;
}

.hero-card p:not(.hero-kicker) {
  max-width: 28ch;
  color: var(--muted);
  line-height: 1.45;
}

.hero-orb {
  position: absolute;
  right: -52px;
  bottom: -58px;
  width: 168px;
  height: 168px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--accent), rgba(105, 233, 170, 0.08) 62%, transparent 70%);
  filter: blur(1px);
  opacity: 0.86;
}

.section-heading,
.list-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 14px;
  color: var(--muted);
}

.section-heading h2 {
  color: var(--text);
  font-size: 1.15rem;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.section-card {
  min-height: 154px;
  padding: 16px;
  border-radius: 26px;
  color: var(--text);
  text-align: left;
}

.section-card.featured {
  grid-column: 1 / -1;
  min-height: 174px;
  background:
    linear-gradient(135deg, rgba(183, 247, 212, 0.16), rgba(40, 88, 118, 0.28)),
    var(--panel-strong);
}

.section-icon {
  display: block;
  margin-bottom: 18px;
  font-size: 1.8rem;
}

.section-title,
.section-description,
.section-meta {
  display: block;
}

.section-title {
  margin-bottom: 7px;
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.section-description,
.section-meta {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.section-meta {
  margin-top: 13px;
  color: var(--accent);
  font-weight: 750;
}

.add-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 30px;
}

.photo-drop {
  display: grid;
  min-height: 172px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(183, 247, 212, 0.42);
  border-radius: 24px;
  background: rgba(11, 18, 32, 0.88);
  color: var(--muted);
  text-align: center;
}

.photo-drop span {
  font-size: 2.2rem;
}

.photo-drop strong,
.photo-drop small {
  display: block;
}

.photo-drop input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.photo-drop img,
.tare-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.form-stack {
  display: grid;
  gap: 10px;
}

label span {
  display: block;
  margin: 0 0 7px 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: none;
  background: rgba(7, 16, 31, 0.72);
  color: var(--text);
}

input {
  height: 48px;
  padding: 0 15px;
}

textarea {
  resize: vertical;
  padding: 13px 15px;
  line-height: 1.35;
}

input:focus,
textarea:focus {
  border-color: rgba(183, 247, 212, 0.72);
  box-shadow: 0 0 0 4px rgba(183, 247, 212, 0.1);
}

.primary-button {
  min-height: 52px;
  border: 0;
  border-radius: 19px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #06121f;
  font-weight: 900;
  box-shadow: 0 12px 32px rgba(105, 233, 170, 0.22);
}

.primary-button:disabled {
  opacity: 0.6;
}

.error {
  color: var(--danger);
  font-size: 0.88rem;
}

.search-row {
  margin-bottom: 14px;
}

.tare-list {
  display: grid;
  gap: 11px;
}

.tare-card {
  display: grid;
  grid-template-columns: 74px 1fr 44px;
  align-items: center;
  gap: 12px;
  min-height: 96px;
  padding: 10px;
  border-radius: 24px;
}

.tare-card img {
  height: 74px;
  border-radius: 18px;
  background: var(--panel-strong);
}

.tare-card p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-weight: 720;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tare-card strong {
  display: block;
  margin-top: 7px;
  color: var(--accent);
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.delete-button {
  color: var(--danger);
  font-size: 1.4rem;
}

.empty-state,
.placeholder-panel {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 28px;
  border-radius: 32px;
  color: var(--muted);
  text-align: center;
}

.empty-state span,
.placeholder-panel span {
  margin-bottom: 12px;
  font-size: 2.8rem;
}

.empty-state h3,
.placeholder-panel h2 {
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.05em;
}

.placeholder-panel p {
  margin-bottom: 18px;
  line-height: 1.5;
}

.settings-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border-radius: 28px;
}

.settings-list div {
  display: grid;
  gap: 5px;
  padding: 18px;
  background: rgba(17, 28, 46, 0.56);
}

.settings-list span {
  color: var(--muted);
  line-height: 1.42;
}

.bottom-nav {
  position: fixed;
  right: max(14px, calc((100vw - 480px) / 2 + 14px));
  bottom: max(14px, env(safe-area-inset-bottom));
  left: max(14px, calc((100vw - 480px) / 2 + 14px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(138, 160, 184, 0.2);
  border-radius: 26px;
  background: rgba(7, 16, 31, 0.82);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(24px);
}

.bottom-nav button {
  display: grid;
  gap: 2px;
  min-height: 52px;
  place-items: center;
  border: 0;
  border-radius: 19px;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
}

.bottom-nav button span {
  font-size: 0.7rem;
  font-weight: 750;
}

.bottom-nav button.active {
  background: rgba(183, 247, 212, 0.12);
  color: var(--accent);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 760px) {
  .phone-shell {
    padding-top: 34px;
  }

  .phone-shell::before {
    position: fixed;
    inset: 18px calc(50% - 258px);
    z-index: -1;
    border: 1px solid rgba(138, 160, 184, 0.18);
    border-radius: 42px;
    content: '';
    pointer-events: none;
  }
}

.object-panel {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(183, 247, 212, 0.2);
  border-radius: 20px;
  background: rgba(183, 247, 212, 0.08);
}

.object-panel strong {
  color: var(--accent);
  font-size: 0.84rem;
}

.object-panel span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.object-panel.loading {
  background: rgba(105, 233, 170, 0.12);
}

.object-panel.muted {
  border-color: var(--line-soft);
  background: rgba(17, 28, 46, 0.38);
}

.add-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.add-panel-header h2 {
  font-size: 1.6rem;
  letter-spacing: -0.06em;
}

.add-cta {
  position: relative;
  display: grid;
  width: 100%;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 26px;
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow);
  grid-template-columns: 56px 1fr 34px;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  background:
    radial-gradient(circle at 20% 10%, rgba(183, 247, 212, 0.14), transparent 38%),
    linear-gradient(145deg, rgba(17, 28, 46, 0.9), rgba(8, 17, 33, 0.82));
  backdrop-filter: blur(22px);
}

.add-cta::after {
  position: absolute;
  inset: 1px;
  border-radius: 25px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 52%);
  content: '';
  pointer-events: none;
}

.add-cta-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(183, 247, 212, 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 35% 25%, rgba(183, 247, 212, 0.26), transparent 48%),
    rgba(7, 16, 31, 0.48);
  color: var(--accent);
  font-size: 1.45rem;
  font-weight: 850;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.add-cta-copy {
  display: grid;
  gap: 5px;
}

.add-cta-copy strong {
  font-size: 1.04rem;
}

.add-cta-copy small {
  color: var(--muted);
  font-size: 0.82rem;
}

.add-cta-arrow {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 16, 31, 0.45);
  color: var(--accent);
  font-weight: 900;
}

.add-panel {
  position: relative;
  padding-top: 18px;
}

.add-panel-header {
  padding-right: 52px;
}

.add-panel-header .icon-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
}

.description-field {
  position: relative;
}

.description-field textarea[readonly] {
  color: var(--muted);
  cursor: wait;
}

.description-loader {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(183, 247, 212, 0.18);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 850ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.account-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(17, 28, 46, 0.9), rgba(8, 17, 33, 0.82));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.account-header h2 {
  max-width: 260px;
  overflow: hidden;
  font-size: 1.35rem;
  letter-spacing: -0.05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-header span,
.home-card span,
.home-card small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.account-header img,
.account-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(183, 247, 212, 0.12);
}

.account-header img {
  object-fit: cover;
}

.account-avatar {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 900;
}

.home-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: rgba(7, 16, 31, 0.46);
}

.home-card strong {
  color: var(--text);
  font-size: 1.05rem;
}

.account-actions,
.invite-form {
  display: grid;
  gap: 10px;
}

.secondary-button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(20, 34, 56, 0.78);
  color: var(--text);
  font-weight: 800;
}

.secondary-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.secondary-button.danger {
  color: var(--danger);
}


.tare-card {
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.tare-card:focus-visible,
.tare-card:hover {
  border-color: rgba(183, 247, 212, 0.38);
  transform: translateY(-1px);
}

.tare-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: end;
  padding: max(16px, env(safe-area-inset-top)) max(14px, calc((100vw - 480px) / 2 + 14px)) max(14px, env(safe-area-inset-bottom));
  background: rgba(3, 8, 18, 0.62);
  backdrop-filter: blur(18px);
  animation: fade-in 180ms ease both;
}

.tare-detail {
  position: relative;
  display: grid;
  gap: 14px;
  max-height: calc(100svh - 32px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(17, 28, 46, 0.98), rgba(8, 17, 33, 0.94));
  box-shadow: var(--shadow);
}

.tare-detail > .icon-button {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 1;
}

.tare-detail > img {
  width: 100%;
  max-height: 52svh;
  min-height: 260px;
  object-fit: cover;
  border-radius: 24px;
  background: var(--panel-strong);
}

.tare-detail-content {
  display: grid;
  gap: 8px;
  padding: 2px 4px 6px;
}

.tare-detail-content h2 {
  color: var(--accent);
  font-size: clamp(2rem, 9vw, 3.2rem);
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.tare-detail-content p:not(.overline) {
  color: var(--text);
  font-size: 1.04rem;
  font-weight: 720;
  line-height: 1.42;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.home-select {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.home-select select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: rgba(7, 16, 31, 0.72);
  color: var(--text);
  font: inherit;
}


.screen.stable {
  animation: none;
}

.loading-screen {
  display: grid;
  min-height: calc(100svh - 120px);
  place-content: center;
  place-items: center;
  gap: 12px;
  text-align: center;
  animation: rise 420ms ease both;
}

.loading-screen h1 {
  max-width: 8ch;
  font-size: clamp(2.3rem, 11vw, 4rem);
}

.loading-screen span {
  max-width: 24ch;
  color: var(--muted);
  line-height: 1.4;
}

.loading-orb {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(183, 247, 212, 0.28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 35% 30%, rgba(183, 247, 212, 0.9), rgba(105, 233, 170, 0.14) 42%, transparent 68%),
    rgba(17, 28, 46, 0.82);
  box-shadow: 0 18px 48px rgba(105, 233, 170, 0.18);
  animation: loading-pulse 1100ms ease-in-out infinite alternate;
}

@keyframes loading-pulse {
  from {
    opacity: 0.58;
    transform: scale(0.94);
  }

  to {
    opacity: 1;
    transform: scale(1.04);
  }
}
