:root {
  color-scheme: light;
  --bg: #f7f4ef;
  --surface: #ffffff;
  --surface-strong: #fff8e8;
  --text: #211f1b;
  --muted: #706c64;
  --line: #ded8cf;
  --accent: #0f7b72;
  --accent-strong: #085c56;
  --pink: #e85d75;
  --gold: #c58b28;
  --shadow: 0 16px 40px rgba(33, 31, 27, 0.1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 202, 213, 0.55), transparent 260px),
    radial-gradient(circle at 88% 12%, rgba(178, 226, 218, 0.5), transparent 250px),
    linear-gradient(180deg, rgba(255, 247, 239, 0.95), transparent 280px),
    var(--bg);
  color: var(--text);
}

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

button {
  cursor: pointer;
}

body.has-record-sheet,
body.has-date-wheel {
  overflow: hidden;
}

.dev-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 112px;
}

.dev-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 2px 16px;
}

.dev-kicker {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dev-topbar h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: 0;
}

.dev-version {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dev-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 20;
  width: min(calc(100% - 28px), 520px);
  padding: 8px;
  border: 1px solid rgba(222, 216, 207, 0.84);
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.88);
  box-shadow: 0 18px 44px rgba(92, 66, 54, 0.16);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.dev-tabs button {
  min-width: 0;
  min-height: 48px;
  border: 1px solid rgba(222, 216, 207, 0.8);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.dev-tabs button[aria-current="page"] {
  border-color: rgba(121, 199, 188, 0.36);
  background: #79c7bc;
  color: #fff;
  box-shadow: 0 10px 22px rgba(121, 199, 188, 0.22);
}

.dev-view {
  display: grid;
  gap: 14px;
  min-height: 360px;
  outline: none;
}

.dev-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dev-card-header,
.dev-card-body {
  padding: 16px;
}

.dev-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-strong);
}

.dev-card h2,
.dev-card h3,
.dev-card p {
  margin: 0;
}

.dev-card h2 {
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.dev-card h3 {
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: 0;
}

.dev-card p {
  color: var(--muted);
  line-height: 1.55;
}

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

.dev-stat {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.dev-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dev-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.1;
}

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

.dev-button {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-weight: 900;
}

.dev-button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.dev-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(232, 93, 117, 0.12);
  color: var(--pink);
  font-size: 12px;
  font-weight: 900;
}

.admin-page {
  display: grid;
  gap: 10px;
  align-content: start;
}

.admin-page__header,
.admin-panel,
.admin-fold,
.admin-menu-card,
.admin-back-button {
  border: 1px solid rgba(222, 216, 207, 0.76);
  border-radius: 20px;
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 207, 218, 0.5), transparent 130px),
    rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 26px rgba(92, 66, 54, 0.08);
}

.admin-page__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 0;
  padding: 14px;
}

.admin-page__header--detail {
  align-items: center;
}

.admin-page__header p,
.admin-page__header h2,
.admin-panel__title h3,
.admin-panel__title p,
.admin-message {
  margin: 0;
}

.admin-page__header p {
  color: #ef6f83;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-page__header h2 {
  margin-top: 4px;
  color: #2e2a25;
  font-size: 23px;
  line-height: 1.12;
  letter-spacing: 0;
}

.admin-count {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(121, 199, 188, 0.34);
  border-radius: 999px;
  background: rgba(238, 250, 247, 0.84);
  color: #4d8179;
  font-size: 13px;
  font-weight: 900;
}

.admin-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.admin-menu {
  display: grid;
  gap: 8px;
}

.admin-menu-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 10px;
  width: 100%;
  min-height: 74px;
  padding: 13px 14px;
  text-align: left;
}

.admin-menu-card__title,
.admin-menu-card__body,
.admin-menu-card__meta {
  display: block;
}

.admin-menu-card__title {
  grid-column: 1;
  color: #2e2a25;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
}

.admin-menu-card__body {
  grid-column: 1;
  color: rgba(82, 74, 65, 0.58);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.admin-menu-card__meta {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  padding: 7px 10px;
  border: 1px solid rgba(121, 199, 188, 0.28);
  border-radius: 999px;
  background: rgba(238, 250, 247, 0.84);
  color: #4d8179;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-back-button {
  justify-self: start;
  min-height: 38px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.74);
  color: rgba(82, 74, 65, 0.76);
  font-size: 12px;
  font-weight: 900;
}

.admin-fold {
  overflow: hidden;
}

.admin-fold__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.admin-fold__summary::-webkit-details-marker {
  display: none;
}

.admin-fold__summary strong,
.admin-fold__summary span {
  display: block;
}

.admin-fold__summary strong {
  color: #2e2a25;
  font-size: 16px;
  line-height: 1.2;
}

.admin-fold__summary span {
  margin-top: 3px;
  color: rgba(82, 74, 65, 0.58);
  font-size: 11px;
  font-weight: 900;
}

.admin-fold__badge {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid rgba(121, 199, 188, 0.28);
  border-radius: 999px;
  background: rgba(238, 250, 247, 0.82);
  color: #4d8179;
  font-size: 11px;
  font-weight: 900;
}

.admin-fold__body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.admin-compact-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(222, 216, 207, 0.58);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.admin-panel__title {
  display: grid;
  gap: 4px;
}

.admin-panel__title h3 {
  color: #2e2a25;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0;
}

.admin-panel__title p {
  color: rgba(82, 74, 65, 0.62);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.admin-source-list {
  display: grid;
  gap: 8px;
}

.admin-source-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(222, 216, 207, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
}

.admin-source-card strong,
.admin-source-card span,
.admin-source-card em {
  display: block;
}

.admin-source-card strong {
  color: #2e2a25;
  font-size: 14px;
  line-height: 1.2;
}

.admin-source-card span {
  margin-top: 3px;
  color: rgba(82, 74, 65, 0.58);
  font-size: 12px;
  font-weight: 900;
}

.admin-source-card em {
  margin-top: 5px;
  color: #4d8179;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.admin-source-card__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.admin-source-card__edit,
.admin-source-card__remove {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.admin-source-card__edit {
  border: 1px solid rgba(121, 199, 188, 0.3);
  border-radius: 999px;
  background: rgba(238, 250, 247, 0.86);
  color: #4d8179;
}

.admin-source-card__remove {
  border: 1px solid rgba(239, 111, 131, 0.24);
  border-radius: 999px;
  background: #fff6f7;
  color: #c6485e;
}

.admin-edit-stack {
  display: grid;
  gap: 8px;
}

.admin-inline-editor {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(121, 199, 188, 0.24);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(190, 237, 229, 0.42), transparent 110px),
    rgba(255, 255, 255, 0.66);
}

.admin-inline-editor__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-cancel-button {
  min-height: 44px;
  border: 1px solid rgba(222, 216, 207, 0.86);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  color: rgba(82, 74, 65, 0.72);
  font-size: 14px;
  font-weight: 900;
}

.admin-source-form {
  display: grid;
  gap: 8px;
}

.admin-field {
  display: grid;
  gap: 5px;
}

.admin-field span,
.admin-color-row span {
  color: rgba(82, 74, 65, 0.62);
  font-size: 12px;
  font-weight: 900;
}

.admin-field__input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(222, 216, 207, 0.86);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: #2e2a25;
  font-weight: 900;
}

.admin-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(222, 216, 207, 0.86);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.admin-field__color {
  width: 46px;
  height: 30px;
  border: 0;
  padding: 0;
  background: transparent;
}

.admin-add-button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: #79c7bc;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(121, 199, 188, 0.22);
}

.admin-message {
  min-height: 20px;
  color: #4d8179;
  font-size: 12px;
  font-weight: 900;
}

.admin-empty {
  margin: 0;
  color: rgba(82, 74, 65, 0.62);
  font-size: 12px;
  font-weight: 800;
}

.admin-profile-dot {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--admin-profile-color, #79c7bc);
}

.mypage-page {
  display: grid;
  align-content: start;
  gap: 8px;
  --profile-color: #79c7bc;
}

.mypage-panel {
  border: 1px solid rgba(222, 216, 207, 0.76);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--profile-color) 18%, transparent), transparent 120px),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(92, 66, 54, 0.08);
}

.mypage-title-row,
.mypage-title-row h2,
.mypage-panel__title h3,
.mypage-panel__title p,
.mypage-message,
.mypage-empty {
  margin: 0;
}

.mypage-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mypage-title-row h2 {
  color: #2e2a25;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: 0;
}

.mypage-title-row span {
  color: #c6485e;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mypage-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.mypage-section-title {
  margin: 0;
  color: #2e2a25;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0;
}

.mypage-panel__title {
  display: grid;
  gap: 4px;
}

.mypage-panel__title h3 {
  color: #2e2a25;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0;
}

.mypage-panel__title p,
.mypage-empty {
  color: rgba(82, 74, 65, 0.62);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.mypage-form {
  display: grid;
  gap: 8px;
}

.mypage-inline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
  align-items: end;
}

.mypage-field {
  display: grid;
  gap: 5px;
}

.mypage-field span,
.mypage-color-row span {
  color: rgba(82, 74, 65, 0.62);
  font-size: 12px;
  font-weight: 900;
}

.mypage-field__input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(222, 216, 207, 0.86);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: #2e2a25;
  font-weight: 900;
}

.mypage-color-row {
  display: grid;
  gap: 5px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.mypage-color-row input {
  width: 100%;
  height: 40px;
  padding: 5px 8px;
  border: 1px solid rgba(222, 216, 207, 0.86);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.mypage-field__color {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(222, 216, 207, 0.86);
}

.mypage-preview,
.mypage-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(222, 216, 207, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.mypage-preview__swatch,
.mypage-profile-card__dot {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 12px;
  background: var(--profile-color);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--profile-color) 28%, transparent);
}

.mypage-preview strong,
.mypage-preview span,
.mypage-profile-card strong,
.mypage-profile-card small {
  display: block;
}

.mypage-preview strong,
.mypage-profile-card strong {
  color: #2e2a25;
  font-size: 14px;
  line-height: 1.2;
}

.mypage-preview span,
.mypage-profile-card small {
  margin-top: 4px;
  color: rgba(82, 74, 65, 0.58);
  font-size: 12px;
  font-weight: 900;
}

.mypage-save-button {
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(82, 74, 65, 0.78);
  font-size: 14px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(222, 216, 207, 0.9);
}

.mypage-message {
  min-height: 20px;
  color: #4d8179;
  font-size: 12px;
  font-weight: 900;
}

.mypage-profile-list {
  display: grid;
  gap: 6px;
}

.mypage-profile-card__dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--friend-color);
}

.info-page {
  display: grid;
  align-content: start;
  gap: 10px;
}

.info-title-row,
.info-title-row h2 {
  margin: 0;
}

.info-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.info-title-row h2 {
  color: #2e2a25;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: 0;
}

.info-title-row span {
  color: #c6485e;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.info-panel {
  padding: 12px;
  border: 1px solid rgba(222, 216, 207, 0.76);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 18%, rgba(190, 237, 229, 0.34), transparent 120px),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(92, 66, 54, 0.08);
}

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

.info-button {
  min-height: 46px;
  padding: 0 10px;
  border: 1px solid rgba(222, 216, 207, 0.86);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  color: #2e2a25;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 8px 18px rgba(92, 66, 54, 0.06);
}

.info-button:nth-child(5) {
  grid-column: 1 / -1;
}

.idol-page {
  display: grid;
  align-content: start;
  gap: 10px;
}

.idol-title-row,
.idol-title-row h2,
.idol-title-row p,
.idol-empty {
  margin: 0;
}

.idol-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.idol-title-row h2 {
  color: #2e2a25;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: 0;
}

.idol-title-row p {
  margin-top: 4px;
  color: rgba(82, 74, 65, 0.58);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.idol-status {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(121, 199, 188, 0.28);
  border-radius: 999px;
  background: rgba(238, 250, 247, 0.84);
  color: #4d8179;
  font-size: 12px;
  font-weight: 900;
}

.idol-search-panel,
.idol-result-card {
  border: 1px solid rgba(222, 216, 207, 0.76);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 18%, rgba(190, 237, 229, 0.28), transparent 120px),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(92, 66, 54, 0.08);
}

.idol-search-panel {
  padding: 12px;
}

.idol-search-field {
  display: grid;
  gap: 6px;
}

.idol-search-field span {
  color: rgba(82, 74, 65, 0.62);
  font-size: 12px;
  font-weight: 900;
}

.idol-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.idol-search-input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(222, 216, 207, 0.86);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: #2e2a25;
  font-weight: 900;
}

.idol-clear-button {
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(222, 216, 207, 0.86);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(82, 74, 65, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.idol-result-list {
  display: grid;
  gap: 8px;
}

.idol-result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.idol-result-card__main {
  min-width: 0;
}

.idol-result-card strong,
.idol-result-card small {
  display: block;
}

.idol-result-card strong {
  color: #2e2a25;
  font-size: 15px;
  line-height: 1.2;
}

.idol-result-card small {
  margin-top: 3px;
  color: rgba(82, 74, 65, 0.58);
  font-size: 12px;
  font-weight: 900;
}

.idol-alias-row,
.idol-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.idol-alias-row {
  margin-top: 7px;
}

.idol-alias-row span,
.idol-chip,
.idol-muted-chip {
  min-height: 28px;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.idol-alias-row span {
  background: rgba(255, 239, 243, 0.92);
  color: #c6485e;
}

.idol-link-row {
  justify-content: flex-end;
}

.idol-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(121, 199, 188, 0.28);
  background: rgba(238, 250, 247, 0.88);
  color: #4d8179;
}

.idol-muted-chip {
  color: rgba(82, 74, 65, 0.5);
  background: rgba(255, 255, 255, 0.62);
}

.idol-empty {
  padding: 14px;
  border: 1px solid rgba(222, 216, 207, 0.76);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  color: rgba(82, 74, 65, 0.62);
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 420px) {
  .idol-result-card {
    grid-template-columns: 1fr;
  }

  .idol-link-row {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .mypage-inline-fields {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 7px;
  }

  .mypage-title-row h2 {
    font-size: 21px;
  }
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(max(94px, env(safe-area-inset-bottom)) + 18px);
  z-index: 80;
  max-width: min(86vw, 360px);
  padding: 11px 14px;
  border: 1px solid rgba(222, 216, 207, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #4d8179;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 14px 34px rgba(92, 66, 54, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 160ms ease, transform 160ms ease;
  backdrop-filter: blur(18px);
}

.app-toast[data-tone="warn"] {
  color: #9c6a1f;
}

.app-toast[data-tone="error"] {
  color: #c6485e;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.calendar-page {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.calendar-page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(222, 216, 207, 0.76);
  border-radius: 24px;
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 207, 218, 0.62), transparent 160px),
    rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 38px rgba(92, 66, 54, 0.1);
}

.calendar-page__header p,
.calendar-page__header h2 {
  margin: 0;
}

.calendar-page__header p {
  color: #ef6f83;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-page__header h2 {
  margin-top: 4px;
  color: #2e2a25;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

.calendar-page__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.calendar-icon-button,
.calendar-today-button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(222, 216, 207, 0.84);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: rgba(82, 74, 65, 0.78);
  font-weight: 900;
}

.calendar-icon-button {
  font-size: 24px;
  line-height: 1;
}

.calendar-today-button {
  padding: 0 12px;
  color: #4d8179;
  font-size: 13px;
}

.calendar-page__status {
  min-height: 20px;
  margin: -4px 4px 0;
  color: rgba(82, 74, 65, 0.62);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.4;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 0 4px;
  color: rgba(82, 74, 65, 0.58);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

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

.calendar-day {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  min-height: 94px;
  padding: 9px 5px;
  border: 1px solid rgba(222, 216, 207, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: #2e2a25;
  text-align: center;
  box-shadow: 0 8px 20px rgba(92, 66, 54, 0.05);
}

.calendar-day--empty {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.calendar-day.has-records {
  border-color: rgba(239, 111, 131, 0.24);
}

.calendar-day.amount-soft {
  background: rgba(255, 235, 239, 0.78);
}

.calendar-day.amount-medium {
  background: rgba(255, 217, 225, 0.84);
}

.calendar-day.amount-strong {
  background: rgba(255, 198, 211, 0.9);
  border-color: rgba(239, 111, 131, 0.36);
}

.calendar-day.is-selected {
  border-color: rgba(239, 111, 131, 0.72);
  box-shadow: inset 0 0 0 2px rgba(239, 111, 131, 0.24), 0 10px 24px rgba(239, 111, 131, 0.1);
}

.calendar-day__number {
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.calendar-day__metrics {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.calendar-day__metrics b,
.calendar-day__metrics span,
.calendar-day__metrics em,
.calendar-day__metrics small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
  line-height: 1.12;
}

.calendar-day__metrics b {
  color: #c6485e;
  font-size: 13px;
  font-weight: 900;
}

.calendar-day__metrics span {
  color: rgba(82, 74, 65, 0.62);
  font-size: 11px;
  font-weight: 900;
}

.calendar-day__metrics em {
  justify-self: center;
  max-width: 100%;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: #c6485e;
  font-size: 10px;
  font-weight: 900;
}

.calendar-day__metrics small {
  color: #4d8179;
  font-size: 10px;
  font-weight: 900;
}

.calendar-day__empty-dot {
  width: 5px;
  height: 5px;
  justify-self: center;
  border-radius: 999px;
}

.calendar-detail {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(222, 216, 207, 0.76);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 38px rgba(92, 66, 54, 0.1);
}

.calendar-detail__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.calendar-detail__header p,
.calendar-detail__header h3 {
  margin: 0;
}

.calendar-detail__header p {
  color: #ef6f83;
  font-size: 12px;
  font-weight: 900;
}

.calendar-detail__header h3 {
  margin-top: 4px;
  color: #2e2a25;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.calendar-detail__header > strong {
  flex: 0 0 auto;
  color: #c6485e;
  font-size: 20px;
}

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

.calendar-detail__stat {
  min-width: 0;
  padding: 12px;
  border-radius: 16px;
  background: #fff8f6;
}

.calendar-detail__stat span,
.calendar-detail__stat strong {
  display: block;
  min-width: 0;
}

.calendar-detail__stat span {
  color: rgba(82, 74, 65, 0.58);
  font-size: 11px;
  font-weight: 900;
}

.calendar-detail__stat strong {
  margin-top: 4px;
  overflow: hidden;
  color: #2e2a25;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-record-empty {
  margin: 0;
  color: rgba(82, 74, 65, 0.62);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.calendar-record-list {
  display: grid;
  gap: 8px;
}

.calendar-record-item {
  padding: 12px;
  border: 1px solid rgba(222, 216, 207, 0.7);
  border-radius: 16px;
  background: #fff;
}

.calendar-record-item strong,
.calendar-record-item span {
  display: block;
}

.calendar-record-item strong {
  color: #2e2a25;
  font-size: 13px;
}

.calendar-record-item span {
  margin-top: 4px;
  color: rgba(82, 74, 65, 0.62);
  font-size: 12px;
  font-weight: 900;
}

.today-wallet-card {
  display: grid;
  gap: 18px;
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: 24px;
  border: 1px solid rgba(239, 111, 131, 0.16);
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 207, 218, 0.88), transparent 170px),
    radial-gradient(circle at 90% 10%, rgba(184, 231, 224, 0.9), transparent 190px),
    linear-gradient(145deg, #fffdf9 0%, #fff4f0 47%, #eefaf7 100%);
  box-shadow: 0 24px 56px rgba(92, 66, 54, 0.14);
  color: #2e2a25;
}

.today-wallet-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 20px;
  pointer-events: none;
}

.today-wallet-card__stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.today-wallet-card__date-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.today-wallet-card__quick-date {
  min-height: 38px;
  border: 1px solid rgba(121, 199, 188, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #4d8179;
  font-size: 13px;
  font-weight: 900;
}

.today-wallet-card__quick-date:nth-child(2) {
  border-color: rgba(121, 199, 188, 0.54);
  background: #79c7bc;
  color: #fff;
}

.today-wallet-card__title-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.today-wallet-card__eyebrow {
  margin: 0;
  color: #ef6f83;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.today-wallet-card h2 {
  margin: 0;
  color: #2e2a25;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.today-wallet-card__date-picker-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2e2a25;
  text-align: left;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
  cursor: pointer;
}

.today-wallet-card__date-picker-button > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.date-wheel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 80px 12px 0;
  background: rgba(46, 42, 37, 0.34);
}

.date-wheel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(100%, 520px);
  max-height: min(70vh, 560px);
  overflow: hidden;
  border: 1px solid rgba(222, 216, 207, 0.9);
  border-radius: 28px 28px 0 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 207, 218, 0.7), transparent 170px),
    linear-gradient(180deg, #fffdf9 0%, #fff8f4 100%);
  box-shadow: 0 -18px 54px rgba(46, 42, 37, 0.18);
}

.date-wheel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(222, 216, 207, 0.7);
}

.date-wheel__header p,
.date-wheel__header h2 {
  margin: 0;
}

.date-wheel__header p {
  color: #ef6f83;
  font-size: 13px;
  font-weight: 900;
}

.date-wheel__header h2 {
  margin-top: 4px;
  color: #2e2a25;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.date-wheel__columns {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0;
  position: relative;
  min-height: 280px;
  padding: 14px 18px;
}

.date-wheel__columns::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  height: 56px;
  border: 1px solid rgba(121, 199, 188, 0.22);
  border-radius: 18px;
  background: rgba(238, 250, 247, 0.5);
  transform: translateY(-50%);
  pointer-events: none;
}

.date-wheel__column {
  display: grid;
  gap: 0;
  position: relative;
  z-index: 1;
  align-content: start;
  min-width: 0;
  overflow-y: auto;
  height: 280px;
  padding: 112px 0;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.date-wheel__column::-webkit-scrollbar {
  display: none;
}

.date-wheel__option {
  display: grid;
  place-items: center;
  height: 56px;
  min-height: 56px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(82, 74, 65, 0.58);
  font-size: 19px;
  font-weight: 900;
  scroll-snap-align: center;
}

.date-wheel__option.is-selected {
  border-color: transparent;
  background: transparent;
  color: #2e2a25;
  font-size: 21px;
  box-shadow: none;
}

.date-wheel__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 18px 18px;
  border-top: 1px solid rgba(222, 216, 207, 0.7);
}

.date-wheel__button {
  min-height: 52px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 900;
}

.date-wheel__button--secondary,
.date-wheel__button--ghost {
  border: 1px solid rgba(222, 216, 207, 0.9);
  background: rgba(255, 255, 255, 0.78);
  color: rgba(82, 74, 65, 0.74);
}

.date-wheel__button--ghost {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
}

.date-wheel__button--primary {
  border: 0;
  background: #ef6f83;
  color: #fff;
  box-shadow: 0 16px 28px rgba(239, 111, 131, 0.22);
}

.today-wallet-card__stats {
  align-items: stretch;
}

.today-wallet-card__stat {
  display: grid;
  align-content: end;
  min-width: 0;
  min-height: 112px;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 12px 30px rgba(92, 66, 54, 0.08);
}

.today-wallet-card__stat strong {
  display: block;
  color: #2e2a25;
  font-size: 42px;
  line-height: 1;
  letter-spacing: 0;
}

.today-wallet-card__stat span {
  display: block;
  margin-top: 8px;
  color: rgba(82, 74, 65, 0.58);
  font-size: 13px;
  font-weight: 900;
}

.today-wallet-card__record-button {
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  background: #ef6f83;
  color: #fff;
  box-shadow: 0 16px 28px rgba(239, 111, 131, 0.26);
  font-size: 17px;
  font-weight: 900;
}

.record-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 80px 12px 0;
  background: rgba(46, 42, 37, 0.38);
}

.record-sheet {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(100%, 520px);
  max-height: min(78vh, 680px);
  overflow: hidden;
  border: 1px solid rgba(222, 216, 207, 0.9);
  border-radius: 28px 28px 0 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 207, 218, 0.72), transparent 180px),
    linear-gradient(180deg, #fffdf9 0%, #fff8f4 100%);
  box-shadow: 0 -18px 54px rgba(46, 42, 37, 0.2);
}

.record-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(222, 216, 207, 0.72);
}

.record-sheet__header p,
.record-sheet__header h2 {
  margin: 0;
}

.record-sheet__header p {
  color: #ef6f83;
  font-size: 13px;
  font-weight: 900;
}

.record-sheet__header h2 {
  margin-top: 4px;
  color: #2e2a25;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.record-sheet__close {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(222, 216, 207, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: rgba(82, 74, 65, 0.72);
  font-size: 13px;
  font-weight: 900;
}

.record-form {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 14px 18px 18px;
}

.record-section,
.record-reset,
.record-summary {
  min-width: 0;
  border: 1px solid rgba(222, 216, 207, 0.68);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(92, 66, 54, 0.06);
}

.record-section,
.record-reset {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.record-section__title {
  margin: 0;
  color: #4d8179;
  font-size: 13px;
  font-weight: 900;
}

.record-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.record-field span {
  color: rgba(82, 74, 65, 0.64);
  font-size: 12px;
  font-weight: 900;
}

.record-field__input,
.record-field__textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(222, 216, 207, 0.9);
  border-radius: 16px;
  background: #fff;
  color: #2e2a25;
  font-weight: 800;
  outline: none;
}

.record-field__input {
  min-height: 50px;
  padding: 0 14px;
}

.record-field__textarea {
  resize: vertical;
  padding: 13px 14px;
  line-height: 1.5;
}

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

.record-type-button {
  min-height: 48px;
  border: 1px solid rgba(239, 111, 131, 0.22);
  border-radius: 16px;
  background: #fff6f7;
  color: #c6485e;
  font-size: 14px;
  font-weight: 900;
}

.record-items {
  display: grid;
  gap: 8px;
}

.record-items__empty {
  margin: 0;
  padding: 13px 14px;
  border: 1px dashed rgba(121, 199, 188, 0.48);
  border-radius: 16px;
  background: rgba(238, 250, 247, 0.72);
  color: rgba(82, 74, 65, 0.62);
  font-size: 13px;
  font-weight: 800;
}

.record-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(121, 199, 188, 0.28);
  border-radius: 16px;
  background: rgba(238, 250, 247, 0.78);
}

.record-item-row strong,
.record-item-row span {
  display: block;
}

.record-item-row strong {
  color: #2e2a25;
  font-size: 15px;
  line-height: 1.2;
}

.record-item-row span {
  margin-top: 4px;
  color: rgba(82, 74, 65, 0.62);
  font-size: 12px;
  font-weight: 900;
}

.record-item-row__steps {
  display: grid;
  grid-template-columns: 34px 28px 34px;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.record-item-row__steps b {
  text-align: center;
  color: #2e2a25;
  font-size: 15px;
}

.record-count-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(121, 199, 188, 0.36);
  border-radius: 12px;
  background: #fff;
  color: #4d8179;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.record-reset {
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.record-reset .record-section__title {
  grid-column: 1 / -1;
}

.record-reset__option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(222, 216, 207, 0.84);
  border-radius: 14px;
  background: #fff;
  color: #2e2a25;
  font-size: 13px;
  font-weight: 900;
}

.record-reset__option input {
  accent-color: #ef6f83;
}

.record-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #fff 0%, #fff6f7 100%);
}

.record-summary strong,
.record-summary span {
  display: block;
}

.record-summary strong {
  color: #2e2a25;
  font-size: 14px;
  line-height: 1.25;
}

.record-summary span {
  margin-top: 5px;
  color: rgba(82, 74, 65, 0.62);
  font-size: 12px;
  font-weight: 900;
}

.record-summary b {
  flex: 0 0 auto;
  color: #ef6f83;
  font-size: 20px;
  line-height: 1.1;
}

.record-form__message {
  min-height: 20px;
  margin: 0;
  color: #4d8179;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
}

.record-form__save {
  position: sticky;
  bottom: 0;
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  background: #ef6f83;
  color: #fff;
  box-shadow: 0 16px 28px rgba(239, 111, 131, 0.25);
  font-size: 17px;
  font-weight: 900;
}

@media (min-width: 860px) {
  .dev-shell {
    width: min(100%, 520px);
    padding-top: 28px;
  }

  .dev-view {
    grid-template-columns: 1fr;
  }

  .today-wallet-card {
    grid-column: auto;
  }

  .record-sheet-backdrop {
    align-items: center;
    padding: 28px;
  }

  .record-sheet {
    max-height: min(82vh, 720px);
    border-radius: 28px;
  }

  .date-wheel-backdrop {
    align-items: center;
    padding: 28px;
  }

  .date-wheel {
    max-height: min(72vh, 620px);
    border-radius: 28px;
  }
}
