.paniqui-body {
  background:
    radial-gradient(circle at top left, rgba(185, 138, 45, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(31, 107, 74, 0.1), transparent 24%),
    var(--paper);
}

.paniqui-page {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 16px 16px 48px;
  display: grid;
  gap: 12px;
}

.paniqui-header {
  margin: 4px 0 4px;
}

.paniqui-header h1 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 2.8rem);
}

.detail-header {
  position: relative;
  z-index: 6;
}

.detail-header h1 {
  font-size: clamp(1.6rem, 7vw, 2.2rem);
}

.lede {
  margin: 8px 0 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 4px;
  padding: 0 12px 0 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  position: relative;
  z-index: 6;
  cursor: pointer;
}

.back-link:hover {
  color: var(--income);
}

.title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.badge-incomplete {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f3e2c0;
  color: #7a5a16;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.incomplete-why {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.month-list {
  display: grid;
  gap: 12px;
}

.month-card {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}

.month-card:active {
  transform: scale(0.995);
}

.month-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.month-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.month-card-pl {
  margin: 8px 0 4px;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 8vw, 2.4rem);
  font-weight: 640;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.month-card[data-status="profit"] .month-card-pl {
  color: var(--income);
}

.month-card[data-status="loss"] .month-card-pl {
  color: var(--loss);
}

.month-card[data-status="break-even"] .month-card-pl {
  color: var(--even);
}

.month-card-meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.opex-panel {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.96);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.opex-sticky {
  padding: 14px;
  background: rgba(255, 253, 247, 0.96);
  border-bottom: 1px solid var(--line);
}

.opex-details {
  margin-top: 0;
  padding: 0 14px 14px;
}

.opex-panel-head h2 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.opex-source {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.opex-total-wrap {
  margin-top: 10px;
}

.opex-total-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.opex-total {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 7vw, 2rem);
  font-weight: 640;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.opex-details summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}

.opex-details summary::-webkit-details-marker {
  display: none;
}

.opex-details summary::after {
  content: "▾";
  margin-left: auto;
  color: var(--muted);
}

.opex-details[open] summary::after {
  content: "▴";
}

.opex-lines {
  display: grid;
  gap: 12px;
  margin: 8px 0 12px;
}

.opex-row {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #faf7f0;
}

.opex-row.is-incomplete {
  border-color: #e2c48a;
  background: #fff8ea;
}

.opex-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.opex-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.zero-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  font-size: 14px;
}

.zero-confirm input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.amount-wrap.with-remove {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.amount-wrap.with-remove .peso {
  left: 12px;
}

.opex-actions {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.add-btn,
.ghost-btn,
.icon-btn {
  min-height: 44px;
}

.pl-hero {
  padding: 18px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.pl-hero[data-status="profit"] {
  background: linear-gradient(180deg, #f3faf6 0%, var(--card) 70%);
  border-color: #c6dfd1;
}

.pl-hero[data-status="loss"] {
  background: linear-gradient(180deg, #fdf4f3 0%, var(--card) 70%);
  border-color: #ebc8c4;
}

.pl-kicker {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--even);
}

.pl-amount {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 11vw, 3.4rem);
  font-weight: 640;
  letter-spacing: -0.03em;
  line-height: 1;
}

.pl-hero[data-status="profit"] .pl-kicker,
.pl-hero[data-status="profit"] .pl-amount {
  color: var(--income);
}

.pl-hero[data-status="loss"] .pl-kicker,
.pl-hero[data-status="loss"] .pl-amount {
  color: var(--loss);
}

.support-stack {
  display: grid;
  gap: 0;
  padding: 4px 0;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
}

.support-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.support-row:first-child {
  border-top: 0;
}

.support-row span {
  color: var(--muted);
  font-size: 14px;
}

.support-row strong {
  font-size: 16px;
  text-align: right;
}

.support-row.muted strong {
  color: var(--muted);
  font-weight: 550;
  font-size: 14px;
}

.footer-link {
  margin: 8px 0 0;
  text-align: center;
}

.footer-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-weight: 650;
}

@media (min-width: 720px) {
  .paniqui-page {
    padding-top: 28px;
  }
}
