@charset "UTF-8";

:root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP',
    sans-serif;
  line-height: 1.7;
  color: #183c47;
  color-scheme: light;
  background-color: #edf6f7;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
}

button,
textarea,
input {
  font: inherit;
}

button,
summary,
.checkbox-label {
  touch-action: manipulation;
}

button,
summary {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.48;
}

:focus-visible {
  outline: 3px solid #007b8c;
  outline-offset: 4px;
}

#contents {
  width: min(100% - 32px, 680px);
  padding: 38px 0 24px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #40666d;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-size: clamp(1.4rem, 4.5vw, 1.9rem);
  line-height: 1.5;
  letter-spacing: 0.02em;
}

h1 span {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 500;
  color: #526a70;
}

#version-info {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 400;
  color: #526a70;
}

.introduction {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: #526a70;
}

.panel {
  padding: 24px;
  margin-bottom: 16px;
  background: #ffffff;
  border: 1px solid #d4e4e7;
  border-radius: 16px;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

h2 {
  margin: 0;
  font-size: 1rem;
}

.input-actions {
  display: flex;
  gap: 8px;
}

.text-button {
  min-height: 44px;
  padding: 5px 10px;
  font-size: 0.85rem;
  color: #31636d;
  background: #f0f6f7;
  border: 1px solid #d4e4e7;
  border-radius: 8px;
}

textarea {
  display: block;
  width: 100%;
  min-height: 90px;
  padding: 14px;
  font-size: 1rem;
  line-height: 1.7;
  color: #183c47;
  overflow-wrap: anywhere;
  resize: vertical;
  background: #ffffff;
  border: 1px solid #98b5bc;
  border-radius: 10px;
}

textarea::placeholder {
  color: #687d82;
  opacity: 1;
}

.input-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.8rem;
}

.checkbox-label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #087b7e;
}

#input-help {
  margin: 0;
  color: #526a70;
}

.section-tag {
  padding: 2px 10px;
  font-size: 0.75rem;
  color: #236668;
  background: #e5f5f1;
  border-radius: 20px;
}

.remaining-text {
  padding: 12px 0 22px;
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.6;
  color: #11686b;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.remaining-text.is-message {
  font-size: 1.05rem;
  font-weight: 500;
  color: #526a70;
}

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

.stats div {
  padding: 12px 4px;
  text-align: center;
  background: #f1f6f7;
  border-radius: 10px;
}

.stats dt {
  font-size: 0.75rem;
  color: #526a70;
}

.stats dd {
  margin: 4px 0 0;
  font-size: 1.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.stats small {
  margin-left: 4px;
  font-size: 0.7rem;
  font-weight: 400;
}

.share-area {
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid #d4e4e7;
}

.share-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: #526a70;
}

#share-text {
  min-height: 84px;
  background: #f8fafb;
  border-color: #d4e4e7;
}

.primary-button {
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  margin-top: 14px;
  font-weight: 700;
  color: #ffffff;
  background: #086e73;
  border: 1px solid #086e73;
  border-radius: 10px;
}

.copy-status {
  min-height: 1.7em;
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: #176449;
  text-align: center;
}

.error-message,
.is-error {
  color: #a53225;
}

.note {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: #526a70;
}

.note:empty {
  display: none;
}

summary {
  padding: 8px 0;
  font-size: 0.9rem;
  font-weight: 600;
}

#breakdown {
  padding-top: 10px;
  padding-bottom: 10px;
}

table {
  width: 100%;
  margin: 12px 0;
  font-size: 0.9rem;
  table-layout: fixed;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 4px;
  text-align: center;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #d4e4e7;
}

thead th {
  font-size: 0.75rem;
  font-weight: 500;
  color: #526a70;
}

th:first-child {
  width: 34%;
  text-align: left;
}

.has-remaining td:last-child {
  font-weight: 700;
  color: #11686b;
  background: #edf8f4;
}

.help {
  padding: 0 8px;
  color: #526a70;
}

.help ul {
  padding-left: 22px;
  margin: 8px 0;
  font-size: 0.8rem;
}

.help li + li {
  margin-top: 8px;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  justify-content: space-between;
  margin-top: 24px;
  font-size: 0.7rem;
  color: #526a70;
}

a {
  color: #256875;
  text-underline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (hover: hover) {
  .primary-button:hover:not(:disabled) {
    background: #055b60;
  }

  .text-button:hover:not(:disabled) {
    background: #e0eef0;
  }
}

@media (width <= 480px) {
  #contents {
    width: calc(100% - 24px);
    padding-top: 24px;
  }

  .panel {
    padding: 16px;
    border-radius: 12px;
  }

  .stats dt {
    font-size: 0.68rem;
  }

  .stats dd {
    font-size: 1.4rem;
  }
}
