:root {
  --bg: #efe2d2;
  --panel: #fffaf2;
  --card: #fffdf8;
  --ink: #181411;
  --muted: #72665a;
  --accent: #e85d2a;
  --accent-soft: #ffd8c7;
  --line: #e5d9c9;
  --line-strong: #ded0bf;
  --panel-soft: #f6ede0;
  --shadow: 0 4px 10px rgba(121, 78, 44, 0.045);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
}

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  padding: 0;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: manipulation;
}

.page-surface,
.page-view,
.toolbar,
.project-card,
.my-dashboard,
.bottom-tabs,
.bottom-tab,
button,
a {
  touch-action: manipulation;
}

body.chrome-settling .bottom-tabs {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-shell {
  width: 100%;
  min-height: auto;
  display: block;
  padding:
    max(14px, calc(env(safe-area-inset-top) + 14px))
    12px
    8px;
  position: relative;
  z-index: 1;
  background: var(--bg);
}

.page-surface {
  width: min(100%, 372px);
  margin: 0 auto;
  display: block;
  min-height: 0;
  padding: 16px 10px calc(88px + env(safe-area-inset-bottom));
  border-radius: 0;
  overflow: visible;
  position: relative;
  background: var(--bg);
  border: 0;
  box-shadow: none;
}

.toolbar {
  width: 100%;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.toolbar.hidden {
  display: none;
}

.search-row {
  display: block;
  margin-bottom: 12px;
}

.search-wrap {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 18px;
  background: #fffdf9;
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  -webkit-tap-highlight-color: transparent;
}

.search-icon {
  width: 18px;
  height: 18px;
  color: #9e9285;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-icon svg {
  width: 18px;
  height: 18px;
}

.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
  caret-color: var(--ink);
}

.search-wrap input:focus {
  background: transparent;
}

.search-wrap input::placeholder {
  color: #a99a8b;
}

.search-wrap input::-webkit-search-decoration,
.search-wrap input::-webkit-search-cancel-button,
.search-wrap input::-webkit-search-results-button,
.search-wrap input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}


.refresh-button {
  width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #6e6257;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

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

.refresh-button[data-state="busy"] svg {
  animation: spin 0.9s linear infinite;
}

.refresh-button:active {
  opacity: 0.72;
}

.chip-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
  padding: 2px;
  border-radius: 16px;
  background: #f3e9db;
}

.chip {
  width: 100%;
  border: 0;
  padding: 10px 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 0.14s ease,
    color 0.14s ease,
    box-shadow 0.14s ease;
}

.chip.active {
  background: var(--ink);
  color: white;
  box-shadow: 0 2px 6px rgba(24, 20, 17, 0.1);
}

.notify-button {
  position: relative;
  width: 48px;
  height: 29px;
  border: 1px solid rgba(218, 205, 189, 0.92);
  min-width: 48px;
  padding: 0;
  border-radius: 999px;
  background: var(--card);
  color: transparent;
  font-size: 0;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.notify-button[data-state="enabled"] {
  background: #171311;
  border-color: #171311;
}

.notify-button[data-state="busy"] {
  opacity: 0.7;
  cursor: progress;
}

.notify-button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.notify-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fffdf9;
  box-shadow: 0 4px 10px rgba(24, 20, 17, 0.12);
  transition: transform 0.16s ease;
}

.notify-button[data-state="enabled"] .notify-switch-thumb {
  transform: translateX(19px);
}

.notify-hint {
  min-height: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  padding: 0;
}

.auth-panel,
.license-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-copy,
.license-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.license-copy.compact {
  margin-top: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-title-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.auth-title {
  font-family: "Iowan Old Style", "Songti SC", Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #2b2624;
}

.auth-title-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f47968;
  margin-top: 6px;
}

.auth-form-minimal {
  gap: 18px;
}

.auth-line-field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  border-bottom: 1px solid #e6dccf;
}

.auth-line-field-with-action .auth-input-line,
.auth-line-field-with-action .code-input {
  flex: 1;
}

.auth-input,
.code-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fffdf9;
  color: var(--ink);
  font-size: 16px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  -webkit-appearance: none;
  appearance: none;
}

.auth-input-line {
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-input::placeholder,
.code-input::placeholder {
  color: #a99a8b;
}

.auth-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.auth-row .code-input {
  flex: 1;
}

.auth-inline-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #7c7064;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.auth-inline-link:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.auth-submit-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: #171311;
  color: #fffdf9;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(23, 19, 17, 0.16);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.auth-submit-button:disabled {
  background: #e7e3dd;
  color: #7f756b;
  box-shadow: none;
  cursor: not-allowed;
}

.auth-button,
.ghost-button,
.license-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(220, 206, 190, 0.9);
  background: #1a1614;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.14s ease,
    background-color 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease;
}

.ghost-button,
.license-button {
  background: transparent;
  color: #1b1714;
  box-shadow: none;
}

.license-button {
  min-width: 76px;
  border-color: rgba(212, 198, 180, 0.92);
  background: transparent;
}

.ghost-button {
  min-height: 40px;
  padding: 0 15px;
  color: #51483f;
  font-weight: 700;
}

.ghost-button:active,
.license-button:active,
.auth-button:active {
  transform: translateY(1px);
}

.ghost-button:hover,
.license-button:hover,
.auth-button:hover {
  border-color: rgba(192, 173, 153, 0.98);
  background: rgba(255, 253, 249, 0.46);
}

.ghost-button:disabled,
.auth-button:disabled,
.license-button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.auth-status {
  min-height: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.auth-status:empty {
  display: none;
}

.auth-status-centered {
  text-align: center;
  min-height: 0;
}

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

.account-hero-copy {
  min-width: 0;
}

.account-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.icon-button {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(220, 206, 190, 0.9);
  border-radius: 14px;
  background: transparent;
  color: #342d28;
  box-shadow: none;
  cursor: pointer;
  transition:
    transform 0.14s ease,
    background-color 0.14s ease,
    border-color 0.14s ease;
}

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

.icon-button:active {
  transform: translateY(1px);
}

.icon-button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.account-summary {
  display: block;
  margin-top: 10px;
}

.account-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.account-status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.account-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3eadf;
  color: #6f6257;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.account-status-pill.active {
  background: #e7f5ec;
  color: #16724a;
}

.account-expiry-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.account-inline-action {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(210, 193, 174, 0.9);
  border-radius: 14px;
  background: transparent;
  color: #16120f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  box-shadow: none;
  transition:
    transform 0.14s ease,
    background-color 0.14s ease,
    border-color 0.14s ease;
}

.account-inline-action:active {
  transform: translateY(1px);
}

.account-inline-action.pending {
  opacity: 0.72;
}

.notify-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(229, 217, 201, 0.78);
}

.notify-inline-copy {
  min-width: 0;
}

.notify-inline-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.notify-toggle {
  flex: 0 0 auto;
}

.notify-hint:empty {
  display: none;
}

.account-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  word-break: break-word;
}

.account-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.favorite-toggle {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #b9aa99;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.14s ease,
    color 0.14s ease,
    opacity 0.14s ease;
}

.favorite-toggle svg {
  width: 20px;
  height: 20px;
}

.favorite-toggle:active {
  transform: translateY(1px);
  opacity: 0.68;
}

.favorite-toggle.active {
  color: #86705f;
}

.favorite-toggle.pinned {
  color: #181411;
}

.favorite-note-toggle {
  width: 28px;
  height: 32px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #9c8c7b;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.14s ease,
    color 0.14s ease,
    opacity 0.14s ease;
}

.favorite-note-toggle svg {
  width: 19px;
  height: 19px;
}

.favorite-note-toggle:active {
  transform: translateY(1px);
  opacity: 0.68;
}

.favorite-note-block {
  display: none;
}

.favorite-note-block.has-note,
.favorite-note-block.editing {
  display: block;
  margin: 8px 0 0;
}

.favorite-note-display {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  margin-top: 4px;
  color: #3f3831;
  font-size: 13px;
  line-height: 1.35;
}

.favorite-note-label {
  flex: 0 0 auto;
  color: #72665a;
  font-weight: 700;
}

.favorite-note-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.favorite-note-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.favorite-note-input {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf2;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
  padding: 0 12px;
  -webkit-appearance: none;
}

.favorite-note-input:focus {
  border-color: #d5c5b2;
  box-shadow: 0 0 0 3px rgba(222, 208, 191, 0.32);
}

.favorite-note-save,
.favorite-note-clear {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  padding: 0 10px;
  -webkit-tap-highlight-color: transparent;
}

.favorite-note-clear {
  color: var(--muted);
}

.card-corner-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  min-height: 32px;
  margin-right: 0;
}

.favorite-list .card-corner-actions {
  flex-basis: 84px;
  width: 84px;
  justify-content: flex-end;
  gap: 14px;
}

.account-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.license-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  background: #f4ecdf;
  color: #3a322c;
  font-size: 11px;
  font-weight: 800;
  align-self: flex-start;
  border: 1px solid rgba(225, 214, 198, 0.9);
}

.license-status-pill.active {
  background: #e7f5ec;
  color: #16724a;
}

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

.license-metric {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fffdf9;
}

.license-metric-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}

.license-metric-value {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.device-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subscription-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-card,
.pending-order-card {
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fffdf9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.plan-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.plan-title,
.pending-order-title {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.plan-copy,
.pending-order-copy,
.address-label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 4px;
}

.plan-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.plan-price {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.pending-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

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

.address-block {
  margin-top: 12px;
}

.payment-notice {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8f0e4;
  border: 1px solid var(--line);
}

.payment-notice-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.payment-notice-copy {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.address-value {
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8f0e4;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  word-break: break-all;
}

.address-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.device-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fffdf9;
}

.device-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.device-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}

.list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 6px 2px 14px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.project-card {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 18px;
  border-radius: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  cursor: default;
  outline: none;
  overflow: hidden;
}

main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
  padding-bottom: 4px;
}

.page-view {
  display: none;
}

.page-view.active {
  display: block;
}

.my-view {
  min-height: 100%;
}

.my-view.auth-only {
  min-height: calc(100dvh - 210px);
  display: flex;
  align-items: center;
}

.my-view.auth-only .my-dashboard {
  width: 100%;
  min-height: calc(100dvh - 240px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.my-view.auth-only .my-dashboard-header,
.my-view.auth-only .favorite-list {
  display: none !important;
}

.my-view.auth-only .account-popover {
  margin: 0;
  min-height: 320px;
  justify-content: center;
}

.my-dashboard {
  position: relative;
  min-height: 100%;
}

.my-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.my-dashboard-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.account-popover-wrap {
  position: static;
  flex: 0 0 auto;
}

.account-popover-toggle {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(221, 208, 191, 0.92);
  border-radius: 14px;
  background: transparent;
  color: #171311;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.14s ease,
    background-color 0.14s ease,
    color 0.14s ease,
    border-color 0.14s ease;
}

.account-popover-toggle svg {
  width: 18px;
  height: 18px;
}

.account-popover-toggle:active {
  transform: translateY(1px);
}

.account-popover-toggle.active {
  background: #171311;
  color: #fffdf9;
  border-color: #171311;
  box-shadow: none;
}

.account-popover {
  position: relative;
  width: 100%;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}

.favorite-list {
  padding-bottom: 14px;
}

.my-dashboard.popover-open .favorite-list {
  display: none;
}

.favorite-empty {
  min-height: 140px;
}

.subscription-empty-state {
  min-height: 188px;
  text-align: center;
  align-items: center;
  justify-content: center;
  padding: 24px 22px 20px;
}

.subscription-empty-title {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  width: 100%;
  text-align: center;
}

.subscription-empty-copy {
  margin-top: 8px;
  width: 100%;
  max-width: 220px;
  margin-inline: auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.my-view.signed-out {
  min-height: calc(100dvh - 210px);
  display: flex;
  align-items: center;
}

.my-view.signed-out .my-stack {
  width: 100%;
  min-height: 0;
  justify-content: center;
  padding-bottom: 56px;
}

.my-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.my-card {
  min-height: 0;
  padding: 14px;
  border-radius: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.my-card-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.my-card-account {
  gap: 8px;
}

.account-popover .my-card {
  padding: 15px 16px 16px;
  border-radius: 22px;
}

.account-popover .my-card-label {
  display: none;
}

.account-popover .subscription-shell {
  gap: 12px;
}

.account-popover .plan-card,
.account-popover .pending-order-card {
  padding: 16px;
}

.account-popover .plan-card {
  gap: 16px;
}

.account-popover .plan-side {
  min-width: 96px;
}

.account-popover .plan-price {
  font-size: 16px;
}

.account-popover .pending-order-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-popover .pending-order-grid .license-metric:first-child {
  grid-column: 1 / -1;
}

.account-popover .pending-order-grid .license-metric:first-child .license-metric-value {
  font-size: 22px;
  line-height: 1.1;
  word-break: break-word;
}

.account-popover .pending-order-grid .license-metric:not(:first-child) .license-metric-value {
  font-size: 15px;
}

.account-popover .address-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-popover .address-actions .ghost-button:last-child {
  grid-column: 1 / -1;
}

.my-card-account.signed-out {
  padding: 20px 18px 18px;
  background:
    radial-gradient(circle at 72% 14%, rgba(255, 223, 178, 0.28), transparent 26%),
    linear-gradient(180deg, #fffdf9 0%, #fffaf2 100%);
}

.my-card-account.signed-out .my-card-label {
  display: none;
}

.my-card-subscription {
  padding-bottom: 18px;
}

.placeholder-card {
  min-height: 148px;
}

.placeholder-card.short {
  min-height: 84px;
}

.bottom-tab {
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  background: transparent;
  color: var(--muted);
  border: 0;
  outline: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 46px;
  padding: 5px 0 3px;
  cursor: pointer;
}

.bottom-tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: none;
  padding: 4px 0 calc(4px + env(safe-area-inset-bottom));
  background: #fbf6ed;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  box-shadow: 0 -6px 14px rgba(121, 78, 44, 0.05);
  z-index: 30;
  overflow: hidden;
  transform: translate3d(0, var(--bottom-tabs-y-fix, 0px), 0);
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.bottom-tabs::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: env(safe-area-inset-bottom);
  background: #fbf6ed;
}

.bottom-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
}

.bottom-tab-icon svg {
  width: 21px;
  height: 21px;
}

.bottom-tab-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
}

.bottom-tab.active {
  color: var(--ink);
}

.bottom-tab.active .bottom-tab-icon {
  transform: translateY(-1px);
}

.bottom-tab:active {
  transform: none;
  opacity: 0.72;
}

.project-card:active {
  transform: none;
}

.project-card:focus-visible {
  box-shadow: var(--shadow);
}

.read-marker-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -2px 2px 12px;
  color: rgba(31, 29, 25, 0.42);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.read-marker-divider::before,
.read-marker-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(31, 29, 25, 0.12);
}

.read-marker-divider span {
  flex: 0 0 auto;
}

.card-top {
  display: block;
}

.identity-block {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.identity-copy {
  min-width: 0;
  flex: 1;
  max-width: 100%;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.title-copy {
  min-width: 0;
  max-width: 100%;
}

.project-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 26% 24%, rgba(255, 255, 255, 0.72), transparent 26%),
    linear-gradient(140deg, var(--avatar-a), var(--avatar-c));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  touch-action: manipulation;
}

.project-avatar::before,
.project-avatar::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.project-avatar::before {
  width: 36px;
  height: 36px;
  top: -8px;
  right: -6px;
}

.project-avatar::after {
  width: 24px;
  height: 24px;
  bottom: -4px;
  left: -2px;
  background: rgba(255, 255, 255, 0.14);
}

.project-avatar span {
  position: relative;
  z-index: 1;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.project-avatar-image {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-avatar-detail {
  width: 76px;
  height: 76px;
  border-radius: 24px;
}

.project-avatar-detail span {
  font-size: 32px;
}

.project-name {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.project-top-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.hot-meta {
  color: #b4491f;
}

.x-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  height: 42px;
  padding: 0 14px;
  border-radius: 16px;
  background: #f7efe3;
  color: var(--ink);
  border: 1px solid var(--line);
  text-decoration: none;
  box-shadow: none;
}

.x-link:active {
  transform: translateY(1px);
}

.x-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
}

.x-copy {
  font-size: 12px;
  font-weight: 800;
}

.x-icon {
  display: block;
  width: 100%;
  height: 100%;
}

.x-link-detail {
  background: #15110f;
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(24, 20, 17, 0.16);
  margin-top: 14px;
}

.project-desc {
  margin: 10px 0 12px;
  color: #423831;
  font-size: 14px;
  line-height: 1.55;
  max-height: calc(1.55em * 3);
  max-width: 100%;
  overflow-wrap: anywhere;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.metric-row {
  display: grid;
  grid-template-columns: max-content max-content 1fr;
  gap: 22px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.metric-action {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  align-self: center;
  padding: 0;
  background: transparent;
}

.metric-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.metric-inline-value {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}

.metric-inline-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.metric-x-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #1a1614;
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(24, 20, 17, 0.14);
}

.metric-x-icon {
  width: 16px;
  height: 16px;
}

.detail-sheet {
  display: none !important;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 12, 10, 0.44);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.sheet-panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(100%, 540px);
  max-width: 540px;
  max-height: 88vh;
  border-radius: 30px 30px 0 0;
  background: #fffdf9;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  box-shadow: 0 -10px 24px rgba(16, 12, 10, 0.12);
  transform: translate(-50%, 100%);
  transition: transform 0.22s ease;
  overflow: hidden;
}

.detail-sheet.open .sheet-backdrop {
  opacity: 1;
}

.detail-sheet.open .sheet-panel {
  transform: translate(-50%, 0);
}

.sheet-grabber {
  width: 56px;
  height: 6px;
  border-radius: 999px;
  background: rgba(24, 20, 17, 0.14);
  margin: 10px auto 6px;
}

.sheet-close {
  display: block;
  margin: 0 14px 0 auto;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.sheet-body {
  padding: 4px 18px calc(28px + env(safe-area-inset-bottom));
  overflow-y: auto;
  max-height: calc(88vh - 42px);
}

.sheet-title {
  margin: 4px 0 0;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.sheet-hero {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sheet-hero-copy {
  min-width: 0;
}

.sheet-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

.sheet-desc {
  margin: 18px 0;
  padding: 16px;
  border-radius: 24px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: #3e342e;
  line-height: 1.65;
}

.section-title {
  margin: 22px 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.monitor-grid,
.timeline {
  display: grid;
  gap: 10px;
}

.monitor-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 3px 8px rgba(121, 78, 44, 0.04);
  font-size: 14px;
  font-weight: 700;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 3px 8px rgba(121, 78, 44, 0.04);
}

.timeline-item strong {
  display: block;
  font-size: 14px;
}

.timeline-item span {
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  border-radius: 28px;
  background: #fffdf9;
  border: 1px solid var(--line);
}

.brand-loading {
  min-height: 196px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background:
    radial-gradient(circle at 68% 18%, rgba(255, 228, 184, 0.26), transparent 26%),
    linear-gradient(180deg, #fffdf9 0%, #fffaf3 100%);
}

.auth-shell-loading {
  padding: 0;
}

.auth-brand-loading {
  min-height: 168px;
  border-radius: 24px;
  border: 0;
  box-shadow: none;
}

.brand-loading-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.brand-loading-mark span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #1b1512;
  opacity: 0.14;
  animation: brand-loading-pulse 1.4s ease-in-out infinite;
}

.brand-loading-mark span:nth-child(2) {
  animation-delay: 0.15s;
}

.brand-loading-mark span:nth-child(3) {
  animation-delay: 0.3s;
}

.brand-loading-title {
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-loading-copy {
  color: #998b7b;
  font-size: 13px;
  line-height: 1.5;
}

@keyframes brand-loading-pulse {
  0%, 100% {
    opacity: 0.14;
    transform: translateY(0);
  }

  50% {
    opacity: 0.52;
    transform: translateY(-2px);
  }
}

.feed-locked-state {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.feed-locked-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.feed-locked-copy {
  max-width: 240px;
  font-size: 13px;
  line-height: 1.6;
}

.list-end {
  padding: 0;
  margin-top: 0;
  margin-bottom: 0;
  text-align: center;
  color: #9b8f82;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

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

@media (min-width: 700px) {
  .app-shell {
    padding-top: 28px;
  }
}
