:root {
  color-scheme: light;
  --bg: #f2f1ec;
  --surface: #fffdf9;
  --surface-soft: #f8f5ee;
  --ink: #272d28;
  --muted: #77786f;
  --faint: #a3a49c;
  --line: rgba(39, 45, 40, 0.12);
  --line-strong: rgba(39, 45, 40, 0.2);
  --forest: #304338;
  --forest-deep: #24332b;
  --rose: #c86961;
  --rose-soft: #f2d8d3;
  --coral: #db756b;
  --butter: #edcd7e;
  --sage: #7b947a;
  --blue: #7694a3;
  --apricot: #d99a74;
  --lilac: #9a879f;
  --shadow-sm: 0 8px 24px rgba(32, 40, 34, 0.07);
  --shadow-md: 0 20px 54px rgba(27, 35, 29, 0.14);
  --radius: 8px;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-display: "Songti SC", "STSong", "SimSun", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(48, 67, 56, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(48, 67, 56, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(200, 105, 97, 0.28);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.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-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.2;
  background-image: radial-gradient(rgba(39, 45, 40, 0.16) 0.55px, transparent 0.55px);
  background-size: 5px 5px;
  mask-image: linear-gradient(to bottom, black, transparent 55%);
}

.app-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 40px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 14px 2px;
  background: rgba(242, 241, 236, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--rose);
  box-shadow: var(--shadow-sm);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-copy small {
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sync-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.7);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--butter);
  box-shadow: 0 0 0 3px rgba(237, 205, 126, 0.18);
}

.sync-state.online .sync-dot {
  background: #6d9b71;
  box-shadow: 0 0 0 3px rgba(109, 155, 113, 0.16);
}

.sync-state.offline .sync-dot {
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(219, 117, 107, 0.16);
}

.identity-button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 5px 11px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(30, 39, 32, 0.04);
  transition: border-color 160ms ease, transform 160ms ease;
}

.identity-button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.identity-button > svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.identity-copy {
  display: flex;
  min-width: 48px;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.identity-copy small {
  color: var(--muted);
  font-size: 9px;
}

.identity-copy strong {
  margin-top: 3px;
  font-size: 13px;
}

.avatar {
  display: inline-grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}

.avatar-a {
  background: #f0d8d1;
}

.avatar-b {
  background: #d8e5df;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.identity-popover {
  position: absolute;
  top: 75px;
  right: 52px;
  width: 218px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  animation: pop-in 150ms ease both;
}

.identity-popover > p {
  margin: 4px 8px 8px;
  color: var(--muted);
  font-size: 12px;
}

.identity-popover > button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.identity-popover > button:hover {
  background: var(--surface-soft);
}

.identity-popover > button > span:last-child {
  display: flex;
  flex-direction: column;
}

.identity-popover strong {
  font-size: 13px;
}

.identity-popover small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

main {
  min-height: 60vh;
}

.welcome-band {
  position: relative;
  display: grid;
  min-height: 310px;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 34px;
  overflow: hidden;
  padding: 46px;
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    var(--forest);
  background-size: 18px 18px;
  color: #fffdf7;
  box-shadow: var(--shadow-md);
}

.welcome-band::after {
  position: absolute;
  right: 258px;
  bottom: -150px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
}

.welcome-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.eyebrow,
.section-kicker {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  color: rgba(255, 253, 247, 0.68);
}

.welcome-copy h1 {
  margin: 14px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(38px, 4.5vw, 62px);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.05;
}

.welcome-subtitle {
  margin: 0;
  color: rgba(255, 253, 247, 0.72);
  font-size: 16px;
  line-height: 1.7;
}

.presence-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

.presence-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 5px 12px 5px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 253, 247, 0.88);
  font-size: 12px;
}

.presence-chip .mini-avatar {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-family: var(--font-display);
  font-size: 11px;
}

.presence-chip strong {
  font-weight: 600;
}

.presence-chip span:last-child {
  color: rgba(255, 253, 247, 0.55);
}

.welcome-aside {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.aside-kicker {
  color: #e7ce94;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.welcome-aside p {
  max-width: 210px;
  margin: 16px 0 0;
  color: rgba(255, 253, 247, 0.66);
  font-size: 12px;
  line-height: 1.7;
}

.cup-scene {
  position: relative;
  width: 112px;
  height: 100px;
  margin-top: 8px;
}

.cup {
  position: absolute;
  left: 25px;
  bottom: 14px;
  display: grid;
  width: 62px;
  height: 57px;
  place-items: center;
  border: 2px solid #f7eee0;
  border-radius: 4px 4px 19px 19px;
  background: #e9d6b7;
  color: var(--rose);
  box-shadow: inset 0 8px 0 #cba77f;
}

.cup::after {
  position: absolute;
  right: -18px;
  top: 13px;
  width: 23px;
  height: 28px;
  border: 2px solid #f7eee0;
  border-left: 0;
  border-radius: 0 15px 15px 0;
  content: "";
}

.cup-heart {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  font-family: Georgia, serif;
  font-size: 19px;
}

.saucer {
  position: absolute;
  left: 13px;
  bottom: 5px;
  width: 86px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.steam {
  position: absolute;
  top: 13px;
  width: 17px;
  height: 34px;
  border-left: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  animation: steam 2.7s ease-in-out infinite;
}

.steam-one {
  left: 46px;
}

.steam-two {
  left: 65px;
  animation-delay: 0.8s;
}

.view-switcher {
  display: flex;
  gap: 8px;
  margin: 24px 0 0;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.view-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.view-tab svg {
  width: 17px;
  height: 17px;
}

.view-tab:hover {
  border-color: var(--line);
  background: rgba(255, 253, 249, 0.6);
  color: var(--ink);
}

.view-tab.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.section-block {
  padding: 44px 0 16px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-kicker {
  color: var(--rose);
}

.section-heading h2,
.section-heading h3 {
  margin: 7px 0 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0;
}

.text-button,
.manage-button,
.soft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.text-button:hover,
.manage-button:hover,
.soft-button:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  transform: translateY(-1px);
}

.text-button svg,
.manage-button svg,
.soft-button svg {
  width: 15px;
  height: 15px;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(200, 105, 97, 0.28);
  border-radius: var(--radius);
  background: #fbf0ec;
}

.catalog-toolbar > p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #7e4c47;
  font-size: 12px;
}

.catalog-toolbar > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  animation: soft-pulse 1.8s ease-in-out infinite;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 186px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.category-rail {
  min-width: 0;
  padding: 20px 12px;
  border-right: 1px solid var(--line);
  background: #f8f5ee;
}

.category-rail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 14px;
  color: var(--muted);
  font-size: 11px;
}

.category-rail-title small {
  color: var(--faint);
  font-size: 10px;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.category-button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #5f635d;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.category-button:hover {
  background: rgba(255, 253, 249, 0.7);
  color: var(--ink);
}

.category-button.active {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(39, 45, 40, 0.05);
}

.category-button.active::before {
  position: absolute;
  left: -1px;
  top: 11px;
  bottom: 11px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--active-color, var(--rose));
  content: "";
}

.category-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.category-tone {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--active-color, var(--rose));
}

.category-name strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-count {
  color: var(--faint);
  font-size: 10px;
}

.category-edit-button {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
}

.category-edit-button svg {
  width: 12px;
  height: 12px;
}

.catalog-panel {
  min-width: 0;
  padding: 24px;
}

.catalog-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.catalog-overline {
  color: var(--rose);
  font-size: 11px;
  font-weight: 600;
}

.catalog-panel-header h3 {
  margin: 5px 0 0;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 650;
}

.manage-button {
  border-color: var(--line);
  background: var(--surface-soft);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.catalog-item {
  position: relative;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.catalog-item:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}

.catalog-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--item-tone, #eee8dc);
}

.catalog-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.catalog-item:hover .catalog-image-wrap img {
  transform: scale(1.025);
}

.catalog-item-body {
  display: flex;
  min-height: 126px;
  flex-direction: column;
  padding: 15px 15px 14px;
}

.catalog-item-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}

.catalog-item-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 7px 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.catalog-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.item-order-label {
  color: var(--item-color, var(--rose));
  font-size: 11px;
  font-weight: 600;
}

.item-add-circle {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

.catalog-item-edit-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  padding: 10px;
  background: linear-gradient(to bottom, rgba(31, 39, 33, 0.38), transparent 45%);
}

.catalog-item-edit-layer button {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.92);
  cursor: pointer;
}

.catalog-item-edit-layer button:last-child {
  color: #a34842;
}

.catalog-item-edit-layer svg {
  width: 14px;
  height: 14px;
}

.empty-catalog {
  display: grid;
  min-height: 280px;
  grid-column: 1 / -1;
  place-items: center;
  padding: 30px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.empty-catalog strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
}

.empty-catalog p {
  margin: 0;
  font-size: 12px;
}

.orders-heading {
  align-items: flex-end;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.filter-tabs button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.filter-tabs button:hover {
  background: var(--surface);
}

.filter-tabs button.active {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.wish-list {
  display: grid;
  gap: 10px;
}

.wish-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.wish-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.wish-card-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}

.wish-card-main {
  min-width: 0;
}

.wish-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
  color: var(--faint);
  font-size: 10px;
}

.wish-card-creator {
  color: var(--muted);
  font-weight: 600;
}

.urgency-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f1eee7;
  color: #716e64;
}

.wish-card h3 {
  overflow: hidden;
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wish-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.wish-card-side {
  display: flex;
  min-width: 114px;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}

.status-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
}

.status-pending {
  background: #f7eed9;
  color: #866c34;
}

.status-pending::before {
  background: #c59a45;
}

.status-accepted {
  background: #e7efe9;
  color: #4e7255;
}

.status-accepted::before {
  background: #6f9a74;
}

.status-completed {
  background: #e9edf0;
  color: #64737b;
}

.status-completed::before {
  background: #80939c;
}

.wish-action {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.wish-action:hover {
  background: var(--forest-deep);
}

.wish-action:disabled {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--faint);
  cursor: default;
}

.empty-orders {
  padding: 42px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.empty-orders strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
}

.empty-orders p {
  margin: 0;
  font-size: 12px;
}

.mood-compose-band {
  margin-top: 4px;
  padding: 42px;
  border-radius: var(--radius);
  background: #fbf3e8;
  box-shadow: inset 0 0 0 1px rgba(126, 92, 58, 0.08);
}

.mood-compose-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 50px;
}

.mood-compose-heading h1 {
  max-width: 650px;
  margin: 9px 0 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 600;
  line-height: 1.14;
}

.mood-compose-heading > p {
  max-width: 290px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.mood-form {
  margin-top: 32px;
}

.mood-options {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

.mood-option {
  display: flex;
  min-width: 0;
  min-height: 114px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: rgba(255, 253, 249, 0.66);
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.mood-option:hover {
  background: var(--surface);
  transform: translateY(-2px);
}

.mood-option.active {
  border-color: currentColor;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.mood-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--mood-tone, #f0d8d1);
}

.mood-symbol svg {
  width: 22px;
  height: 22px;
}

.mood-happy {
  --mood-tone: #f5dfa1;
  color: #8c6c1f;
}

.mood-miss {
  --mood-tone: #f2d3d1;
  color: #a14f4b;
}

.mood-tired {
  --mood-tone: #dbe4e6;
  color: #5f7980;
}

.mood-blue {
  --mood-tone: #d7e2e8;
  color: #557481;
}

.mood-quiet {
  --mood-tone: #dce8d9;
  color: #5b775c;
}

.mood-soft {
  --mood-tone: #edd9c7;
  color: #986b4d;
}

.mood-note-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 14px;
}

.mood-note-row textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 249, 0.76);
  color: var(--ink);
  line-height: 1.7;
}

.mood-submit {
  display: flex;
  min-width: 150px;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
}

.mood-submit > span {
  color: var(--faint);
  font-size: 10px;
  text-align: right;
}

.primary-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.primary-button:hover {
  background: var(--forest-deep);
  box-shadow: 0 8px 18px rgba(39, 45, 40, 0.16);
  transform: translateY(-1px);
}

.primary-button svg {
  width: 16px;
  height: 16px;
}

.compact-button {
  min-height: 38px;
  padding: 0 14px;
}

.wide-button {
  width: 100%;
}

.timeline-section {
  padding: 48px 0 16px;
}

.section-note {
  color: var(--faint);
  font-size: 11px;
}

.timeline {
  position: relative;
  display: grid;
  gap: 13px;
  padding-left: 30px;
}

.timeline::before {
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.timeline-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  padding: 18px 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.timeline-entry::before {
  position: absolute;
  left: -27px;
  top: 24px;
  width: 11px;
  height: 11px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--mood-color, var(--rose));
  content: "";
}

.timeline-entry-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.timeline-entry-header strong {
  font-family: var(--font-display);
  font-size: 16px;
}

.timeline-mood {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--mood-tone, #f2d8d3);
  color: var(--mood-color, #a25450);
  font-size: 10px;
  font-weight: 600;
}

.timeline-time {
  color: var(--faint);
  font-size: 10px;
}

.timeline-entry p {
  margin: 0;
  color: #555b55;
  font-size: 13px;
  line-height: 1.75;
}

.timeline-entry p.empty-note {
  color: var(--faint);
  font-style: italic;
}

.reaction-button {
  display: inline-flex;
  align-items: center;
  align-self: start;
  gap: 5px;
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.reaction-button:hover,
.reaction-button.active {
  border-color: rgba(200, 105, 97, 0.35);
  background: #fbefec;
  color: var(--rose);
}

.reaction-button svg {
  width: 14px;
  height: 14px;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
  padding: 24px 2px 0;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 10px;
}

.app-footer p {
  margin: 0;
  color: var(--muted);
}

.mobile-nav {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(25, 31, 26, 0.56);
  backdrop-filter: blur(5px);
  animation: fade-in 160ms ease both;
}

.bottom-sheet {
  width: min(560px, 100%);
  max-height: min(88vh, 820px);
  overflow-y: auto;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  animation: sheet-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.sheet-handle {
  display: none;
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.sheet-header h2 {
  margin: 7px 0 0;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 650;
  line-height: 1.25;
}

.close-button {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.field-label {
  display: block;
  margin: 18px 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.field-label:first-child {
  margin-top: 0;
}

.text-input {
  width: 100%;
  min-height: 46px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  line-height: 1.6;
  transition: border-color 160ms ease, background 160ms ease;
}

.text-input:focus {
  border-color: rgba(200, 105, 97, 0.55);
  background: var(--surface);
}

.text-input[readonly] {
  color: var(--muted);
  cursor: default;
}

textarea.text-input {
  resize: vertical;
}

.select-input {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 21px,
    calc(100% - 12px) 21px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.order-preview {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.order-preview img {
  width: 108px;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
  background: #ece6da;
}

.order-preview > div {
  min-width: 0;
}

.order-preview span {
  color: var(--rose);
  font-size: 10px;
  font-weight: 600;
}

.order-preview strong {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 21px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-preview p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.urgency-field,
.color-field {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.urgency-field legend,
.color-field legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.segmented-control button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.segmented-control button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(39, 45, 40, 0.09);
}

.wish-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.wish-form-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.wish-form-footer strong {
  color: var(--ink);
}

.wish-form-footer .primary-button {
  min-width: 178px;
}

.name-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.name-fields label {
  min-width: 0;
}

.settings-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  margin: 20px 0;
  padding: 13px;
  border-radius: var(--radius);
  background: #f3f6f2;
  color: #607164;
}

.settings-note svg {
  width: 20px;
  height: 20px;
}

.settings-note p {
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
}

.image-editor {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.image-upload-preview {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  cursor: pointer;
}

.image-upload-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.image-upload-overlay {
  position: absolute;
  inset: auto 8px 8px;
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(24, 31, 26, 0.76);
  color: white;
  font-size: 10px;
}

.image-upload-overlay svg {
  width: 14px;
  height: 14px;
}

.image-editor-copy strong {
  font-family: var(--font-display);
  font-size: 17px;
}

.image-editor-copy p {
  margin: 7px 0 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.danger-text {
  min-height: 28px;
  padding: 0;
  border: 0;
  color: #a54e48;
}

.danger-text:hover {
  border: 0;
  background: transparent;
}

.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-swatch {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid var(--surface);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--line);
}

.color-swatch.active::after {
  position: absolute;
  inset: 7px;
  border: 2px solid white;
  border-radius: 50%;
  content: "";
}

.color-rose {
  background: var(--rose);
}

.color-butter {
  background: #c79d43;
}

.color-sage {
  background: var(--sage);
}

.color-blue {
  background: var(--blue);
}

.color-apricot {
  background: var(--apricot);
}

.color-lilac {
  background: var(--lilac);
}

.form-hint {
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.6;
}

.editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.danger-button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(165, 78, 72, 0.22);
  border-radius: 999px;
  background: #faefed;
  color: #9c4b46;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.danger-button:hover {
  border-color: rgba(165, 78, 72, 0.4);
}

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 210px;
  max-width: min(360px, calc(100vw - 44px));
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: var(--forest-deep);
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: var(--shadow-md);
  animation: toast-in 180ms ease both;
}

.toast.error {
  background: #7c3f3a;
}

.cloud-account-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.cloud-account-panel strong {
  font-family: var(--font-display);
  font-size: 16px;
}

.cloud-account-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.cloud-account-panel .cloud-invite-line {
  margin-top: 7px;
  color: var(--ink);
}

.cloud-invite-line code {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e8efe9;
  color: #4e7255;
  font-family: Consolas, monospace;
  letter-spacing: 0.08em;
}

.cloud-account-panel .danger-button {
  min-height: 34px;
  flex: 0 0 auto;
}

.cloud-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 24px;
  background:
    linear-gradient(rgba(48, 67, 56, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(48, 67, 56, 0.045) 1px, transparent 1px),
    #f2f1ec;
  background-size: 25px 25px;
}

.cloud-gate-card {
  width: min(460px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.cloud-gate-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.cloud-gate-brand > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cloud-gate-brand small {
  color: var(--rose);
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.cloud-gate-brand strong {
  font-family: var(--font-display);
  font-size: 19px;
}

.cloud-gate-card h2 {
  margin: 8px 0 9px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 650;
  line-height: 1.2;
}

.cloud-gate-intro {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.cloud-auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
}

.cloud-auth-actions .primary-button,
.cloud-auth-actions .soft-button {
  min-height: 46px;
}

.cloud-form-status {
  min-height: 18px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.cloud-form-status.error {
  color: #a54e48;
}

.cloud-onboarding-block {
  display: grid;
  gap: 10px;
}

.cloud-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0;
  color: var(--faint);
  font-size: 10px;
}

.cloud-divider::before,
.cloud-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.invite-code-input {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.cloud-signout-text {
  display: block;
  margin: 18px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
}

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

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(0.98);
  }
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes steam {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(5px) scaleY(0.85);
  }
  50% {
    opacity: 0.68;
    transform: translateY(-5px) scaleY(1.05);
  }
}

@keyframes soft-pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .app-shell {
    width: min(100% - 28px, 900px);
  }

  .sync-state {
    display: none;
  }

  .welcome-band {
    min-height: 280px;
    grid-template-columns: minmax(0, 1fr) 230px;
    padding: 36px;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mood-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: 76px;
  }

  .app-shell {
    width: min(100% - 22px, 680px);
    padding-bottom: 20px;
  }

  .topbar {
    min-height: 68px;
    padding: 10px 1px;
  }

  .brand-mark {
    width: 37px;
    height: 37px;
  }

  .brand-copy strong {
    max-width: 140px;
    overflow: hidden;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .identity-copy,
  .identity-button > svg {
    display: none;
  }

  .identity-button {
    width: 42px;
    min-height: 42px;
    justify-content: center;
    padding: 2px;
  }

  .identity-button .avatar {
    width: 36px;
    height: 36px;
  }

  .topbar-actions {
    gap: 7px;
  }

  .identity-popover {
    top: 63px;
    right: 50px;
  }

  .welcome-band {
    min-height: 294px;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 29px 24px;
  }

  .welcome-band::after {
    right: -125px;
    bottom: -175px;
  }

  .welcome-copy h1 {
    margin-top: 12px;
    font-size: 40px;
  }

  .welcome-subtitle {
    font-size: 14px;
  }

  .welcome-aside {
    display: none;
  }

  .presence-row {
    margin-top: 22px;
  }

  .view-switcher {
    margin-top: 16px;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .view-tab {
    min-height: 38px;
    padding: 0 13px;
    font-size: 12px;
  }

  .section-block {
    padding-top: 34px;
  }

  .section-heading {
    align-items: center;
    gap: 12px;
    margin-bottom: 17px;
  }

  .section-heading h2 {
    font-size: 25px;
  }

  .section-heading > .text-button {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    padding: 0;
    font-size: 0;
  }

  .section-heading > .text-button svg {
    width: 17px;
    height: 17px;
  }

  .catalog-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-toolbar > div {
    width: 100%;
  }

  .catalog-toolbar .soft-button {
    flex: 1;
  }

  .catalog-layout {
    display: block;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .category-rail {
    margin: 0 -11px;
    padding: 0 11px 12px;
    overflow: hidden;
    border: 0;
    background: transparent;
  }

  .category-rail-title {
    display: none;
  }

  .category-list {
    flex-direction: row;
    gap: 7px;
    overflow-x: auto;
    padding: 1px 0 4px;
    scrollbar-width: none;
  }

  .category-list::-webkit-scrollbar {
    display: none;
  }

  .category-button {
    width: auto;
    min-width: max-content;
    min-height: 38px;
    justify-content: flex-start;
    padding: 0 12px;
    border-color: var(--line);
    border-radius: 999px;
    background: var(--surface);
  }

  .category-button.active::before {
    display: none;
  }

  .category-button.active {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
  }

  .category-button.active .category-count {
    color: rgba(255, 255, 255, 0.58);
  }

  .category-edit-button {
    border-color: rgba(255, 255, 255, 0.18);
  }

  .catalog-panel {
    padding: 14px 0 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .catalog-panel-header {
    margin-bottom: 15px;
    padding: 0 14px;
  }

  .catalog-panel-header h3 {
    font-size: 20px;
  }

  .manage-button {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
  }

  .catalog-grid {
    gap: 8px;
    padding: 0 9px 9px;
  }

  .catalog-item-body {
    min-height: 116px;
    padding: 12px;
  }

  .catalog-item-title {
    font-size: 17px;
  }

  .catalog-item-description {
    margin-bottom: 10px;
    font-size: 11px;
    -webkit-line-clamp: 2;
  }

  .item-order-label {
    font-size: 10px;
  }

  .item-add-circle {
    width: 25px;
    height: 25px;
  }

  .filter-tabs {
    justify-content: flex-start;
    margin: 0 -11px;
    padding: 0 11px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .filter-tabs button {
    flex: 0 0 auto;
    border-color: var(--line);
    background: var(--surface);
  }

  .orders-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .wish-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 11px;
    align-items: start;
    padding: 13px;
  }

  .wish-card-side {
    grid-column: 2;
    min-width: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .wish-action {
    min-height: 31px;
  }

  .mood-compose-band {
    padding: 27px 18px;
  }

  .mood-compose-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .mood-compose-heading h1 {
    font-size: 34px;
  }

  .mood-compose-heading > p {
    max-width: 100%;
  }

  .mood-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .mood-option {
    min-height: 96px;
  }

  .mood-note-row {
    grid-template-columns: 1fr;
  }

  .mood-submit {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .mood-submit > span {
    order: 2;
  }

  .timeline {
    padding-left: 24px;
  }

  .timeline::before {
    left: 6px;
  }

  .timeline-entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .timeline-entry::before {
    left: -22px;
    width: 9px;
    height: 9px;
  }

  .reaction-button {
    justify-self: start;
  }

  .app-footer {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr 72px 1fr;
    align-items: center;
    min-height: 62px;
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(36, 51, 43, 0.96);
    color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 16px 40px rgba(24, 31, 26, 0.25);
    backdrop-filter: blur(16px);
  }

  .mobile-nav > button:not(.mobile-add) {
    display: flex;
    min-height: 48px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 9px;
    cursor: pointer;
  }

  .mobile-nav > button.active {
    color: #fff;
  }

  .mobile-nav > button svg {
    width: 20px;
    height: 20px;
  }

  .mobile-add {
    display: grid;
    width: 54px;
    height: 54px;
    justify-self: center;
    place-items: center;
    border: 3px solid var(--bg);
    border-radius: 50%;
    background: var(--rose);
    color: #fff;
    box-shadow: 0 9px 18px rgba(200, 105, 97, 0.34);
    cursor: pointer;
  }

  .mobile-add svg {
    width: 23px;
    height: 23px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .bottom-sheet {
    width: 100%;
    max-height: 92vh;
    padding: 12px 18px max(24px, env(safe-area-inset-bottom));
    border-radius: 8px 8px 0 0;
    animation-name: sheet-up;
  }

  .sheet-handle {
    display: block;
    width: 42px;
    height: 4px;
    margin: 0 auto 15px;
    border-radius: 99px;
    background: var(--line-strong);
  }

  .sheet-header {
    margin-bottom: 20px;
  }

  .sheet-header h2 {
    font-size: 24px;
  }

  .wish-form-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .wish-form-footer .primary-button {
    width: 100%;
  }

  .name-fields,
  .image-editor {
    grid-template-columns: 1fr;
  }

  .image-upload-preview {
    max-width: 240px;
  }

  .toast-region {
    right: 12px;
    bottom: 88px;
    left: 12px;
  }

  .toast {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .cloud-gate {
    align-items: start;
    padding: 12px;
  }

  .cloud-gate-card {
    min-height: calc(100vh - 24px);
    padding: 24px 20px max(24px, env(safe-area-inset-bottom));
  }

  .cloud-account-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .cloud-account-panel .danger-button {
    width: 100%;
  }
}

@media (max-width: 440px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .catalog-image-wrap {
    aspect-ratio: 16 / 9;
  }

  .catalog-item-body {
    min-height: 102px;
  }

  .welcome-copy h1 {
    font-size: 36px;
  }

  .presence-chip {
    min-height: 32px;
  }

  .section-heading h2 {
    font-size: 23px;
  }

  .mood-option {
    min-height: 89px;
    font-size: 11px;
  }

  .mood-symbol {
    width: 37px;
    height: 37px;
  }
}

@keyframes sheet-up {
  from {
    opacity: 0;
    transform: translateY(35px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
