:root {
  --color-background: #080b17;
  --color-surface-start: #1b1c25;
  --color-surface-end: #13141b;
  --color-border: #33384f;
  --color-gold-start: #ebc27e;
  --color-gold-end: #c4a271;
  --color-sub: #f4e5d2;
  --color-white: #ffffff;
  --color-disabled: #d9d9d9;
  --color-muted: #76767e;
  --surface-gradient: linear-gradient(180deg, var(--color-surface-start), var(--color-surface-end));
  --gold-gradient: linear-gradient(96deg, var(--color-gold-start) 3%, var(--color-gold-end));
  --page-max-width: 480px;
  --page-gutter: 20px;
  --radius-card: 20px;
  --font-sans: "Noto Sans JP", "Noto Sans", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

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

html {
  min-height: 100%;
  background: #03050b;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--color-white);
  background: #03050b;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.web-page-content {
  width: 100%;
  padding: 20px var(--page-gutter) calc(40px + env(safe-area-inset-bottom, 0));
}

.web-page-content--help {
  padding-top: 32px;
}

.markdown-body {
  color: var(--color-sub);
  font-size: 15px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.markdown-body > :first-child {
  margin-top: 0;
}

.markdown-body > :last-child {
  margin-bottom: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin: 2em 0 0.75em;
  color: var(--color-white);
  line-height: 1.5;
}

.markdown-body h1 { font-size: 22px; }
.markdown-body h2 { font-size: 19px; }
.markdown-body h3 { font-size: 17px; }

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote,
.markdown-body pre,
.markdown-body table {
  margin: 0 0 1.25em;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.5em;
}

.markdown-body a {
  color: var(--color-gold-start);
  text-underline-offset: 3px;
}

.web-page-content--help .markdown-body > ul:only-child {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  list-style: none;
  background: var(--surface-gradient);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
}

.web-page-content--help .markdown-body > ul:only-child > li {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.web-page-content--help .markdown-body > ul:only-child > li + li {
  margin-top: 24px;
}

.web-page-content--help .markdown-body > ul:only-child > li + li::before {
  position: absolute;
  top: -12px;
  right: 0;
  left: 0;
  height: 1px;
  content: '';
  background: var(--color-border);
}

.web-page-content--help .markdown-body > ul:only-child a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 39px;
  color: var(--color-sub);
  font-size: 12px;
  font-weight: 700;
  line-height: 39px;
  text-decoration: none;
  white-space: nowrap;
}

.web-page-content--help .markdown-body > ul:only-child a::after {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-left: 8px;
  content: '';
  background: url('/images/webview/back.svg') center / 14px 8px no-repeat;
  transform: rotate(-90deg);
}

.markdown-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5em auto;
  border-radius: 12px;
}

.markdown-body blockquote {
  padding-left: 1em;
  color: var(--color-disabled);
  border-left: 3px solid var(--color-gold-start);
}

.markdown-body code {
  padding: 0.15em 0.35em;
  font-size: 0.9em;
  background: var(--color-surface-start);
  border-radius: 4px;
}

.markdown-body pre {
  max-width: 100%;
  padding: 12px;
  overflow-x: auto;
  background: var(--color-surface-start);
  border-radius: 8px;
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
}

.markdown-body table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.markdown-body th,
.markdown-body td {
  padding: 8px;
  border: 1px solid var(--color-border);
}

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

.webview-shell {
  position: relative;
  width: 100%;
  max-width: var(--page-max-width);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background-color: var(--color-background);
  background-image: url("/images/webview/background.png");
  background-position: center top;
  background-size: cover;
  padding-top: env(safe-area-inset-top, 0);
}

.gold-text {
  color: var(--color-gold-start);
  background: var(--gold-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.webview-header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  width: 100%;
  height: 66px;
  padding: 18px 12px;
}

.webview-header__side {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.webview-header__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 25px;
  text-align: center;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface-gradient);
  border: 1px solid var(--color-border);
  border-radius: 999px;
}

.icon-button img {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.icon-button img[src$="back.svg"] {
  transform: rotate(90deg);
}

.page-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  padding: 32px var(--page-gutter) calc(32px + env(safe-area-inset-bottom, 0));
}

.surface {
  width: 100%;
  background: var(--surface-gradient);
  border: 0;
  border-radius: var(--radius-card);
  box-shadow: inset 0 0 0 1px var(--color-border);
}

.section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 25px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 20px;
}

.plan-card .section-title {
  display: flex;
  align-items: center;
  min-height: 36px;
}

.plan-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label,
.field-value,
.plan-name,
.cancellation-card__copy p {
  margin: 0;
}

.field-label {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 19px;
}

.field-label--light {
  color: var(--color-disabled);
  font-weight: 500;
}

.plan-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 19px;
}

.details-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px;
}

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

.detail-icon {
  display: grid;
  flex: 0 0 50px;
  place-items: center;
  width: 50px;
  height: 50px;
  background: var(--surface-gradient);
  border: 1px solid var(--color-border);
  border-radius: 999px;
}

.detail-icon img {
  display: block;
  width: 24px;
  height: 24px;
}

.field-value {
  margin-top: 4px;
  color: var(--color-white);
  font-size: 16px;
  font-weight: 500;
  line-height: 19px;
  letter-spacing: 0.06em;
}

.details-card__divider {
  width: 100%;
  height: 1px;
  margin: 0;
  background: var(--color-border);
  border: 0;
}

.cancellation-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 16px;
}

.cancellation-card .section-title {
  display: flex;
  align-items: center;
  min-height: 36px;
}

.cancellation-card__notice {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notice-icon {
  display: block;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
}

.cancellation-card__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.5px;
}

.muted {
  color: var(--color-muted);
}

.outline-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 12px;
  color: var(--color-gold-start);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--color-gold-start);
  border-radius: 20px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 170px var(--page-gutter) 40px;
}

.empty-state__visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
}

.empty-state__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 246px;
  height: 246px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.empty-state__icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 65px;
  height: 65px;
}

.empty-state h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--color-sub);
  font-size: 18px;
  font-weight: 700;
  line-height: 39px;
  text-align: center;
}

.webview-error {
  display: grid;
  place-items: center;
  padding: 24px;
}

.webview-error__content {
  text-align: center;
}

.webview-error__code {
  margin: 0;
  color: var(--color-gold-start);
  font-size: 48px;
  font-weight: 700;
}

.webview-error h1 {
  margin: 12px 0 0;
  color: var(--color-sub);
  font-size: 18px;
}

.password-reset-content {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 66px);
  padding: 32px var(--page-gutter) calc(24px + env(safe-area-inset-bottom, 0));
}

.password-reset-content h2 {
  margin: 0 0 20px;
  color: var(--color-sub);
  font-size: 18px;
  line-height: 39px;
}

.password-reset-form {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.password-reset-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.password-reset-input {
  width: 100%;
  height: 56px;
  padding: 12px;
  color: var(--color-white);
  font: inherit;
  font-size: 14px;
  background: var(--surface-gradient);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  outline: none;
}

.password-reset-input:focus {
  border-color: var(--color-gold-start);
}

.password-reset-rules {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 32px 0;
  padding: 0;
  color: var(--color-sub);
  font-size: 12px;
  list-style: none;
}

.password-reset-rules li::before {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: -4px;
  content: '';
  border: 1px solid var(--color-gold-start);
  border-radius: 50%;
}

.password-reset-submit {
  width: 100%;
  min-height: 56px;
  margin-top: auto;
  color: #1a1a1a;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: var(--gold-gradient);
  border: 0;
  border-radius: 20px;
}

.password-reset-errors {
  margin-bottom: 20px;
  padding: 12px 16px;
  color: var(--color-sub);
  font-size: 13px;
  background: rgba(120, 20, 20, 0.35);
  border: 1px solid rgba(255, 120, 120, 0.55);
  border-radius: 14px;
}

.password-reset-errors ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.password-reset-alert {
  display: grid;
  min-height: 100dvh;
  padding: 24px;
  place-content: center;
  text-align: center;
}

.password-reset-alert h1 {
  margin: 0;
  font-size: 18px;
}

.password-reset-alert p {
  margin: 12px 0 0;
  color: var(--color-sub);
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 340px) {
  :root {
    --page-gutter: 16px;
  }

  .page-content {
    gap: 24px;
  }

  .cancellation-card__copy {
    letter-spacing: 0.2px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .icon-button,
  .outline-button {
    transition: opacity 120ms ease, transform 120ms ease;
  }

  .icon-button:active,
  .outline-button:active {
    opacity: 0.75;
    transform: scale(0.98);
  }
}

.contact-inquiry {
  background-image: url('/images/webview/withdrawal-background.png');
  background-position: center top;
  background-size: 100% auto;
}

.contact-inquiry-form {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 66px);
}

.contact-inquiry-content {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 32px var(--page-gutter) 24px;
}

.contact-inquiry-field {
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--color-sub);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.contact-inquiry-field select,
.contact-inquiry-field textarea,
.contact-inquiry-field input {
  width: 100%;
  color: var(--color-white);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  background: var(--surface-gradient);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  outline: none;
}

.contact-inquiry-field select,
.contact-inquiry-field input {
  height: 56px;
  padding: 0 16px;
}

.contact-inquiry-field select {
  padding-right: 44px;
  appearance: none;
}

.contact-inquiry-select-wrap {
  position: relative;
}

.contact-inquiry-select-wrap::after {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 9px;
  height: 9px;
  pointer-events: none;
  content: '';
  border-right: 1.5px solid var(--color-gold-start);
  border-bottom: 1.5px solid var(--color-gold-start);
  transform: translateY(-70%) rotate(45deg);
}

.contact-inquiry-field textarea {
  min-height: 158px;
  padding: 16px;
  line-height: 1.7;
  resize: vertical;
}

.contact-inquiry-field select:focus,
.contact-inquiry-field textarea:focus,
.contact-inquiry-field input:focus {
  border-color: var(--color-gold-start);
}

.contact-inquiry-field select:invalid,
.contact-inquiry-field textarea::placeholder,
.contact-inquiry-field input::placeholder {
  color: var(--color-muted);
}

.contact-inquiry-notes {
  margin: -14px 0 0;
  padding-left: 20px;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.75;
}

.contact-inquiry-actions {
  margin-top: auto;
  padding: 24px var(--page-gutter) calc(24px + env(safe-area-inset-bottom, 0));
}

.contact-inquiry-submit {
  width: 100%;
  min-height: 56px;
  padding: 12px;
  color: #1a1a1a;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: var(--gold-gradient);
  border: 0;
  border-radius: 20px;
}

.contact-inquiry-submit:disabled {
  color: #55565e;
  cursor: default;
  background: #1a1a1a;
}

.contact-inquiry-errors {
  padding: 12px 16px;
  color: var(--color-sub);
  font-size: 13px;
  background: rgba(120, 20, 20, 0.35);
  border: 1px solid rgba(255, 120, 120, 0.55);
  border-radius: 14px;
}

.contact-inquiry-errors p {
  margin: 0;
}

.contact-inquiry-errors p + p {
  margin-top: 6px;
}

.contact-inquiry-complete {
  display: grid;
  padding: 32px var(--page-gutter);
  place-items: center;
}

.contact-inquiry-complete__content {
  width: 100%;
  text-align: center;
}

.contact-inquiry-complete__content h1 {
  margin: 0;
  font-size: 20px;
}

.contact-inquiry-complete__content p {
  margin: 20px 0 36px;
  color: var(--color-sub);
  font-size: 13px;
  line-height: 1.8;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.withdrawal {
  background-image: url('/images/webview/withdrawal-background.png');
  background-position: center top;
  background-size: 100% auto;
}

.withdrawal-form,
.withdrawal-step {
  width: 100%;
}

.withdrawal-content,
.subscription-warning-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px var(--page-gutter);
}

.withdrawal-intro,
.subscription-warning-intro {
  text-align: center;
}

.step-back-button {
  align-self: flex-start;
}

.withdrawal-intro h2,
.subscription-warning-intro h2 {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 25px;
}

.withdrawal-intro p,
.subscription-warning-intro p,
.store-guidance p {
  margin: 0;
  color: var(--color-sub);
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.38px;
}

.withdrawal-warning {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 20px;
  border: 1px solid #ff6b6b;
  border-radius: 12px;
}

.withdrawal-alert-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: #ff575f;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  list-style: none;
}

.withdrawal-alert-list li {
  position: relative;
  padding-left: 22px;
}

.withdrawal-alert-list li:first-child {
  line-height: 25px;
}

.withdrawal-alert-list li::before {
  position: absolute;
  top: 50%;
  left: 0;
  display: grid;
  width: 12px;
  height: 12px;
  color: #080b17;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  content: '!';
  background: #ff575f;
  border-radius: 50%;
  transform: translateY(-50%);
  place-items: center;
}

.withdrawal-losses {
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: var(--color-border);
  border-radius: 12px;
}

.withdrawal-losses p {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 39px;
  margin: 0;
  color: var(--color-sub);
  font-size: 12px;
  font-weight: 700;
}

.withdrawal-losses img {
  width: 30px;
  height: 30px;
}

.withdrawal-losses strong {
  margin-left: -4px;
  color: var(--color-gold-start);
}

.withdrawal-reasons {
  padding: 16px 21px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: none;
}

.withdrawal-reasons legend {
  float: none;
  width: auto;
  margin: 0 0 13px;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 25px;
}

.withdrawal-reason {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 49px;
  color: var(--color-sub);
  font-size: 12px;
  font-weight: 500;
  line-height: 25px;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
}

.withdrawal-reason:nth-of-type(5) {
  min-height: 25px;
  border-bottom: 0;
}

.withdrawal-reason input {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  appearance: none;
  border: 1px solid var(--color-gold-start);
  border-radius: 50%;
}

.withdrawal-reason input:checked {
  background: var(--gold-gradient);
}

.withdrawal-reason input:checked::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 5px;
  content: '';
  border-bottom: 2px solid #33384f;
  border-left: 2px solid #33384f;
  transform: rotate(-45deg);
}

.withdrawal-details {
  margin-top: 12px;
}

.withdrawal-details textarea {
  display: block;
  width: 100%;
  min-height: 158px;
  padding: 12px 16px;
  color: var(--color-sub);
  font: inherit;
  font-size: 12px;
  line-height: 18px;
  resize: vertical;
  background: var(--surface-gradient);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  outline: none;
}

.withdrawal-details textarea:focus {
  border-color: var(--color-gold-start);
}

.withdrawal-details textarea::placeholder {
  color: var(--color-muted);
}

.withdrawal-errors {
  padding: 12px 16px;
  color: #ff6b6b;
  font-size: 12px;
  line-height: 1.6;
  border: 1px solid #ff6b6b;
  border-radius: 12px;
}

.withdrawal-errors p {
  margin: 0;
}

.withdrawal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 24px var(--page-gutter) calc(24px + env(safe-area-inset-bottom, 0));
}

.primary-button,
.danger-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  text-decoration: none;
  border-radius: 20px;
}

.primary-button {
  color: #1a1a1a;
  background: var(--gold-gradient);
  border: 0;
}

.danger-button {
  color: #ff575f;
  background: transparent;
  border: 1px solid #ff575f;
}

.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.subscription-warning-content {
  gap: 24px;
}

.subscription-warning-intro {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.subscription-warning-intro h2 {
  margin: 0;
}

.subscription-warning-intro p,
.store-guidance p {
  text-align: left;
}

.subscription-warning-intro .outline-button {
  min-height: 63px;
  padding: 18px 20px;
  color: var(--color-gold-start);
  font-size: 16px;
  line-height: 25px;
  border-color: var(--color-gold-start);
  border-radius: 12px;
}

.store-guidance {
  display: contents;
  text-align: center;
}

.store-guidance h3 {
  margin: 0;
  font-size: 16px;
  line-height: 25px;
}

.store-guidance .primary-button {
  margin-top: 24px;
}

.store-guidance small {
  margin-bottom: 24px;
  color: var(--color-white);
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0.5px;
}

.withdrawal-complete {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background-image: url('/images/webview/withdrawal-complete.png');
  background-position: center top;
  background-size: cover;
}

.withdrawal-complete__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 70px 20px;
  color: var(--color-sub);
  text-align: center;
}

.withdrawal-complete__check {
  width: 65px;
  height: 65px;
  margin-top: 40px;
  margin-bottom: 39px;
}

.withdrawal-complete h1 {
  margin: 0;
  font-size: 18px;
  line-height: 39px;
}

.withdrawal-complete p {
  margin: 16px 0 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.5px;
}

.withdrawal-complete__actions {
  flex: 0 0 auto;
}

@media (prefers-reduced-motion: no-preference) {
  .primary-button,
  .danger-button {
    transition: opacity 120ms ease, transform 120ms ease;
  }

  .primary-button:active,
  .danger-button:active {
    opacity: 0.75;
    transform: scale(0.98);
  }
}
