:root {
  color-scheme: light;
  --app-background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 32%),
    radial-gradient(circle at 15% 18%, rgba(128, 158, 255, 0.42), transparent 32%),
    radial-gradient(circle at 85% 12%, rgba(255, 147, 170, 0.58), transparent 30%),
    radial-gradient(circle at 52% 84%, rgba(128, 176, 255, 0.28), transparent 32%),
    linear-gradient(135deg, #eef4ff 0%, #ffe4f2 45%, #ffd6ec 100%);
  --text: #f8fafc;
  --muted: rgba(226, 232, 240, 0.72);
  --muted-strong: rgba(255, 255, 255, 0.80);
  --glass: rgba(255, 255, 255, 0.14);
  --glass-strong: rgba(255, 255, 255, 0.20);
  --glass-soft: rgba(255, 255, 255, 0.10);
  --line: rgba(255, 255, 255, 0.28);
  --line-soft: rgba(255, 255, 255, 0.18);
  --blue: #0ea5e9;
  --indigo: #6366f1;
  --green: #10b981;
  --cyan: #06b6d4;
  --red: #ef4444;
  --pink: #ff5bb7;
  --pink-soft: #ff9bcf;
  --pink-deep: #ff2f9b;
  --panel-inset:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    inset 0 -18px 30px rgba(255, 91, 183, 0.10),
    inset 0 20px 38px rgba(255, 255, 255, 0.18);
  --radius-lg: 34px;
  --radius-md: 26px;
  --radius-sm: 22px;
  --control-height: 58px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: var(--app-background);
  overflow-x: hidden;
}

html {
  background-attachment: fixed;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--app-background);
  pointer-events: none;
}

body::after {
  display: none;
}

body::after {
  width: 420px;
  height: 420px;
  right: -126px;
  bottom: -136px;
  background: rgba(217, 70, 239, 0.26);
}

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

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 34px 20px;
  background: transparent;
  overflow-x: hidden;
}

.page::before {
  display: none;
}

.app-shell {
  position: relative;
  width: min(820px, 100%);
  max-width: 100%;
  min-width: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

body:not([data-tool="home"]) .app-shell {
  width: min(680px, 100%);
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  box-shadow: 0 20px 54px rgba(255, 158, 200, 0.30);
  pointer-events: none;
}

.tool-card,
.rate-result,
.result {
  background: rgba(255, 255, 255, 0.38);
  background-clip: padding-box;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-lg);
  box-shadow: var(--panel-inset);
  backdrop-filter: blur(36px) saturate(190%);
  -webkit-backdrop-filter: blur(36px) saturate(190%);
}

.tool-card {
  position: relative;
  z-index: 1;
  overflow: hidden;
  isolation: isolate;
  clip-path: inset(0 round var(--radius-lg));
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 30px;
  animation: glassIn 520ms ease both;
}

body:not([data-tool="home"]) .tool-card {
  padding: 26px;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 45%),
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.34), transparent 36%),
    radial-gradient(circle at 78% 100%, rgba(255, 91, 183, 0.14), transparent 34%);
  pointer-events: none;
}

.tool-card::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.30);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 12px 14px 28px rgba(255, 255, 255, 0.18),
    inset -12px -16px 26px rgba(255, 91, 183, 0.10);
  pointer-events: none;
}

.tool-card > * {
  position: relative;
  z-index: 1;
}

@keyframes glassIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

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

.eyebrow,
.section-kicker {
  margin: 0;
  color: #Ff9ec8;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 115, 176, 0.42);
}

h1,
h2,
h3 {
  margin: 0;
  color: #ff69b4;
  letter-spacing: 0;
}

.brand-name {
  font-weight: 800;
}

h1 {
  margin-top: 8px;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.08;
  font-weight: 900;
  color: #fb7da8;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-title span {
  min-width: 0;
}

.site-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 10px 18px rgba(255, 105, 180, 0.22));
}

h2 {
  margin-top: 6px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 850;
}

h3 {
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 850;
}

.summary {
  margin: 10px 0 0;
  color: #ff9a8b;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 600;
}

.app-header {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.home-header {
  margin-bottom: 16px;
  padding-bottom: 0;
  border-bottom: 0;
}

.tool-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin: 0 0 20px;
  padding: 8px 8px 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -10px 18px rgba(255, 91, 183, 0.08);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.mini-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #ff5bb7;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
}

.mini-brand .site-logo {
  width: 30px;
  height: 30px;
}

.mini-brand span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ff8fc3;
  font-size: 13px;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.tool-nav span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.back-home {
  flex: 0 0 auto;
  color: #ff5bb7;
  text-decoration: none;
  font-weight: 900;
  border: 1px solid rgba(255, 158, 200, 0.40);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.20);
  font-size: 13px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.back-home::before {
  content: "< ";
}

.brand-copy {
  min-width: 0;
  max-width: 560px;
}

.home-countdown-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 20px;
}

.home-target-card {
  color: inherit;
  text-decoration: none;
  transition: all 0.22s ease;
}

.home-target-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.20);
}

.toolbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.toolbox-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 196px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.16);
  color: #ff8fc3;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    inset 0 16px 26px rgba(255, 255, 255, 0.12),
    inset 0 -16px 28px rgba(255, 91, 183, 0.10);
  overflow: hidden;
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  transition: all 0.22s ease;
}

.toolbox-card::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent 42%),
    radial-gradient(circle at 88% 100%, rgba(255, 91, 183, 0.14), transparent 40%);
  pointer-events: none;
}

.toolbox-card > * {
  position: relative;
  z-index: 1;
}

.toolbox-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
}

.toolbox-card:active {
  transform: scale(0.98);
}

.toolbox-card strong {
  color: #ff5bb7;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}

.toolbox-card span:not(.toolbox-icon) {
  color: #ff9a8b;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 700;
}

.toolbox-card em {
  align-self: end;
  justify-self: start;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--pink-deep), var(--pink-soft));
  color: #b1fbff;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.toolbox-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 18px;
  color: #ff5bb7;
  background: rgba(255, 255, 255, 0.24);
  font-size: 20px;
  font-weight: 900;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -10px 18px rgba(255, 91, 183, 0.12);
}

.toolbox-card.is-disabled {
  opacity: 0.9;
}

.countdown-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.header-side {
  width: 100%;
  justify-self: stretch;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.date-countdown,
.love-day {
  width: 100%;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  min-height: 156px;
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -14px 26px rgba(255, 158, 200, 0.12);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
}

.date-countdown {
  min-width: 0;
}

.countdown-label,
.countdown-caption {
  color: #ff9ec8;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 850;
}

.countdown-label {
  letter-spacing: 0.09em;
  min-width: 0;
  overflow-wrap: anywhere;
}

.countdown-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.date-countdown .countdown-caption {
  max-width: 100%;
  color: #ff8fc3;
  font-size: 15px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.countdown-edit {
  width: auto;
  min-width: 0;
  min-height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 158, 200, 0.42);
  border-radius: 999px;
  padding: 0 10px;
  color: #ff5bb7;
  background: rgba(255, 255, 255, 0.20);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
}

.date-countdown strong,
.love-day strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #ff5bb7;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1;
  font-weight: 900;
  min-width: 0;
}

.date-countdown strong span:last-child,
.love-day strong span:first-child,
.love-day strong span:last-child {
  font-size: 18px;
  font-weight: 850;
}

.love-day {
  gap: 8px;
  justify-items: center;
  min-height: 158px;
  padding: 22px 24px;
  text-align: center;
}

.love-day .countdown-label {
  font-size: 15px;
  letter-spacing: 0;
}

.love-day .love-start,
.love-day .countdown-caption {
  display: none;
}

.love-day strong {
  justify-content: center;
  gap: 6px;
  width: 100%;
  font-size: clamp(42px, 6.5vw, 60px);
}

.love-day strong span:first-child,
.love-day strong span:last-child {
  font-size: 22px;
}

.note-pill {
  display: inline-flex;
  align-items: center;
  align-self: start;
  max-width: 100%;
  min-width: 0;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  color: #ff5fb0;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.countdown-picker {
  display: grid;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
}

.countdown-picker span {
  color: #ff9ec8;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.countdown-picker input,
.countdown-picker textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 158, 200, 0.42);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.22);
  color: #ff5bb7;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 850;
  outline: none;
}

.countdown-picker textarea {
  min-height: 86px;
  padding: 12px;
  line-height: 1.45;
  resize: vertical;
}

.countdown-picker input:focus,
.countdown-picker textarea:focus {
  border-color: rgba(255, 91, 183, 0.66);
  box-shadow: 0 0 0 3px rgba(255, 91, 183, 0.14);
}

.countdown-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  width: 100vw;
  max-width: 100vw;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.countdown-modal[hidden] {
  display: none !important;
}

.confirm-modal {
  z-index: 30;
}

.countdown-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 216, 232, 0.42);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.countdown-dialog {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  max-width: 100%;
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 26px;
  background: rgba(255, 245, 251, 0.72);
  box-shadow:
    0 18px 60px rgba(255, 91, 183, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -18px 30px rgba(255, 158, 200, 0.13);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
}

.confirm-dialog {
  width: min(390px, 100%);
}

.countdown-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.countdown-dialog h3 {
  color: #ff5bb7;
  font-size: 20px;
}

.confirm-summary {
  display: grid;
  gap: 10px;
}

.confirm-summary div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.20);
}

.confirm-summary span {
  color: #ff9ec8;
  font-size: 12px;
  font-weight: 850;
}

.confirm-summary strong {
  min-width: 0;
  color: #ff5bb7;
  font-size: 15px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.countdown-close {
  width: 32px;
  min-height: 32px;
  flex: 0 0 32px;
  border: 1px solid rgba(255, 158, 200, 0.38);
  border-radius: 999px;
  padding: 0;
  color: #ff5bb7;
  background: rgba(255, 255, 255, 0.28);
  font-size: 16px;
  line-height: 1;
}

.countdown-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.countdown-dialog-actions button {
  min-height: 44px;
  padding: 0 14px;
  font-size: 14px;
}

body.modal-open {
  overflow: hidden;
}

.save-toast {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 40;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background: rgba(255, 245, 251, 0.78);
  color: #ff5bb7;
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 16px 42px rgba(255, 91, 183, 0.20);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
}

.section-heading {
  margin-bottom: 18px;
}

.tool-hero {
  margin: 0 0 20px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at 88% 12%, rgba(255, 91, 183, 0.14), transparent 38%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    inset 0 -14px 24px rgba(255, 91, 183, 0.08);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.tool-hero .summary {
  margin-top: 8px;
  max-width: 520px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.form-grid label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.form-grid label span,
.section-label,
.label {
  color: #ff9ec8;
  font-size: 14px;
  font-weight: 750;
}

select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--control-height);
  border: 1px solid rgba(255, 175, 208, 0.25);
  border-radius: var(--radius-sm);
  background-color: #ffa6c9;
  color: #6df3fa;
  padding: 0 18px;
  font-size: 16px;
  font-weight: 700;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  transition: all 0.22s ease;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.9) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.9) 50%, transparent 50%);
  background-position:
    calc(100% - 24px) 26px,
    calc(100% - 15px) 26px;
  background-size: 9px 9px, 9px 9px;
  background-repeat: no-repeat;
  padding-right: 48px;
}

.form-grid label {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

select option {
  color: #111827;
  background: #ffffff;
}

select:disabled {
  opacity: 0.72;
  color: rgba(109, 243, 250, 0.78);
  cursor: not-allowed;
}

select:hover,
.rate-result:hover,
.result:hover {
  transform: translateY(-1px);
}

select:focus {
  border-color: rgba(125, 211, 252, 0.82);
  box-shadow:
    0 0 0 4px rgba(14, 165, 233, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  background-color: rgba(255, 255, 255, 0.22);
}

.query-mode-card {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 22px 0 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    inset 0 12px 22px rgba(255, 255, 255, 0.12),
    inset 0 -12px 20px rgba(255, 91, 183, 0.09);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  overflow: hidden;
}

.query-mode-card::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.26), transparent 42%),
    radial-gradient(circle at 95% 100%, rgba(255, 91, 183, 0.12), transparent 38%);
  pointer-events: none;
}

.query-mode-card > * {
  position: relative;
  z-index: 1;
}

.section-label {
  display: block;
  width: auto;
  margin: 0 0 14px;
  padding: 0;
  line-height: 1.3;
  background: transparent;
  transform: none;
}

.query-mode-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.query-mode-options label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
  cursor: pointer;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  transition: all 0.22s ease;
}

.query-mode-options label span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.query-mode-options label:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.query-mode-options label:has(input:checked) {
  border-color: rgba(255, 155, 207, 0.58);
  background: rgba(255, 91, 183, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 182, 220, 0.14);
}

.query-mode-options input {
  appearance: none;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.82) 0 2px, transparent 3px),
    linear-gradient(145deg, #e0f7ff 0%, #bae6fd 46%, #8bd7fb 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.78),
    inset 0 -2px 5px rgba(14, 165, 233, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.50);
}

.query-mode-options input:checked {
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.82) 0 2px, transparent 3px),
    linear-gradient(145deg, #ff9bd1 0%, var(--pink) 52%, #e93498 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.72),
    inset 0 -2px 5px rgba(157, 23, 77, 0.22),
    0 0 0 1px rgba(255, 182, 220, 0.58);
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 22px;
}

button {
  min-height: var(--control-height);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 850;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background-clip: padding-box;
  overflow: hidden;
  transition: all 0.22s ease;
}

.primary {
  background: linear-gradient(135deg, var(--pink-deep), var(--pink-soft));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

#query-rate {
  color: #b1fbff;
}

.secondary {
  background: rgba(255, 91, 183, 0.20);
  border-color: rgba(255, 182, 220, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

button:hover {
  transform: translateY(-2px);
}

.secondary:hover {
  background: rgba(255, 91, 183, 0.28);
}

button:active {
  transform: scale(0.97);
}

button:disabled {
  opacity: 0.45;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

button.is-loading {
  opacity: 0.82;
}

.status {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.status.success {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.18);
  color: #ffffff;
}

.status.error {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(239, 68, 68, 0.18);
  color: #ffffff;
}

.rate-result,
.result {
  margin-top: 18px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 22px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    inset 0 12px 22px rgba(255, 255, 255, 0.10),
    inset 0 -12px 22px rgba(255, 91, 183, 0.09);
  transition: all 0.22s ease;
  overflow: hidden;
}

.result-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.trend-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  padding: 0 12px;
  color: #ff9ec8;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.trend-badge.up {
  color: #ff9ec8;
  background: rgba(34, 197, 94, 0.18);
}

.trend-badge.down {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.40);
  background: rgba(239, 68, 68, 0.16);
}

.trend-badge.neutral {
  color: #ff9ec8;
  background: rgba(148, 163, 184, 0.16);
}

.rate-highlight {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.rate-highlight strong {
  color: #ff5bb7;
  font-size: clamp(34px, 6vw, 50px);
  line-height: 1;
  font-weight: 900;
}

.result-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}

.result-list > div {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.result-list dt {
  color: #ff9ec8;
  font-size: 12px;
  font-weight: 750;
}

.result-list dd {
  margin: 0;
  color: #ff5bb7;
  font-size: 14px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.hint {
  margin: 10px 0 0;
  color: rgba(226, 232, 240, 0.66);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    overflow-x: hidden;
  }

  .page {
    align-items: start;
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .app-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-radius: 26px;
    margin-left: auto;
    margin-right: auto;
  }

  .tool-card,
  .rate-result,
  .result {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body::after,
  .page::before {
    display: none !important;
  }

  .tool-card {
    padding: 18px 16px;
    border-radius: 26px;
    clip-path: inset(0 round 26px);
  }

  .rate-result,
  .result {
    border-radius: 24px;
    padding: 18px;
  }

  h1 {
    margin-top: 5px;
    font-size: 30px;
    line-height: 1;
  }

  .brand-title {
    gap: 8px;
  }

  .site-logo {
    width: 38px;
    height: 38px;
    border-radius: 0;
  }

  h2 {
    margin-top: 4px;
    font-size: 21px;
  }

  .summary {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.35;
  }

  .eyebrow,
  .section-kicker {
    font-size: 11px;
    line-height: 1.2;
  }

  .form-grid,
  .toolbox-grid,
  .home-countdown-strip,
  .countdown-board,
  .actions,
  .query-mode-card,
  .query-mode-options,
  .result-list {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .tool-nav {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 20px;
  }

  .tool-page-header {
    margin-bottom: 14px;
    padding: 7px;
    border-radius: 22px;
  }

  .mini-brand {
    font-size: 13px;
  }

  .mini-brand .site-logo {
    width: 28px;
    height: 28px;
  }

  .back-home {
    padding: 8px 10px;
    font-size: 12px;
  }

  .home-countdown-strip {
    gap: 12px;
    margin-bottom: 14px;
  }

  .tool-nav span {
    width: 100%;
    white-space: normal;
  }

  .toolbox-card {
    min-height: 150px;
    padding: 18px;
    border-radius: 24px;
  }

  .toolbox-card strong {
    font-size: 20px;
  }

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

  .actions button,
  select,
  input,
  textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .app-header {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 14px;
    padding-bottom: 14px;
  }

  .header-side {
    width: 100%;
    justify-self: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .date-countdown,
  .love-day {
    width: 100%;
    align-content: center;
    justify-items: start;
    gap: 5px;
    min-height: 124px;
    padding: 14px;
    border-radius: 22px;
  }

  .date-countdown strong,
  .love-day strong {
    font-size: clamp(24px, 7vw, 34px);
  }

  .love-day {
    gap: 5px;
    min-height: 128px;
    padding: 15px;
  }

  .love-day .countdown-label {
    font-size: 13px;
  }

  .love-day strong {
    gap: 5px;
    font-size: clamp(32px, 9vw, 42px);
  }

  .love-day strong span:first-child,
  .love-day strong span:last-child {
    font-size: 17px;
  }

  .countdown-label,
  .countdown-caption,
  .note-pill {
    font-size: 11px;
  }

  .date-countdown .countdown-caption {
    font-size: 12px;
  }

  .note-pill {
    max-width: 100%;
    padding: 5px 9px;
  }

  .countdown-edit {
    min-height: 26px;
    padding: 0 8px;
    font-size: 11px;
  }

  .section-heading {
    margin-bottom: 14px;
  }

  .tool-hero {
    padding: 16px;
    border-radius: 24px;
  }

  .query-mode-card {
    margin-top: 16px;
    padding: 18px 14px 14px;
    border-radius: 24px;
  }

  .section-label {
    position: static;
    display: block;
    margin: 0 0 12px;
    padding: 0;
    line-height: 1.3;
    background: transparent;
    transform: none;
  }

  .query-mode-options {
    gap: 12px;
  }

  .query-mode-options label {
    min-height: 52px;
  }

  button,
  select,
  .countdown-picker input,
  .countdown-picker textarea {
    min-height: 52px;
  }

  .countdown-modal {
    align-items: end;
    padding: 12px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    min-height: 100dvh;
  }

  .countdown-dialog {
    width: 100%;
    max-width: 390px;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    justify-self: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 18px;
  }

  .countdown-picker input,
  .countdown-picker textarea,
  .countdown-dialog-actions button {
    font-size: 16px;
  }

  .countdown-picker textarea {
    resize: none;
  }

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

@media (max-width: 390px) {
  .header-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 340px) {
  .countdown-dialog-actions {
    grid-template-columns: 1fr;
  }
}
