.sp-tt-page {
  max-width: 1120px;
}

.sp-tt-page-header {
  max-width: 1120px;
}

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

.sp-tt-description {
  line-height: 1.9;
}

.sp-tt-card {
  padding-bottom: 25px;
}

.sp-tt-card-head {
  margin-bottom: 17px;
  align-items: center;
}

.sp-tt-section-title {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 17px;
}

.sp-tt-input-table {
  display: grid;
  gap: 12px;
}

.sp-tt-row-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.sp-tt-field {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
}

.sp-tt-field-label {
  font-size: 13px;
  color: var(--ink);
  padding-left: 4px;
  border-right: 1px solid #ececec;
  min-height: 26px;
  display: flex;
  align-items: center;
}

.sp-tt-field-control {
  padding-left: 14px;
  min-width: 0;
}

.sp-tt-time-group,
.sp-tt-duration-group,
.sp-tt-text-group {
  display: flex;
  align-items: center;
  min-width: 0;
}

.sp-tt-time-group {
  gap: 6px;
}

.sp-tt-duration-group {
  gap: 0;
}

.sp-tt-text-group {
  width: 100%;
}

.sp-tt-input-table input,
.sp-tt-input-table select {
  padding: 7px 8px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  width: 100%;
}

.sp-tt-input-table input,
.sp-tt-input-table select {
  appearance: auto;
}

.sp-tt-input-table select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 28px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10"><path d="M1 3l4 4 4-4" stroke="%23888888" stroke-width="1.3" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat right 8px center;
  background-size: 10px;
  background-repeat: no-repeat;
}

.sp-tt-input-table input:focus,
.sp-tt-input-table select:focus,
.sp-tt-display-card select:focus {
  outline: none;
  border-color: var(--cta);
}

.sp-tt-input-table input[type="number"] {
  font-family: "Courier New", Courier, monospace;
  text-align: center;
}

.sp-tt-input-table input[type="number"]::-webkit-inner-spin-button,
.sp-tt-input-table input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
  display: block;
  -webkit-appearance: inner-spin-button;
}

.sp-tt-time-group input,
.sp-tt-time-group select {
  width: 60px;
  max-width: 60px;
}

.sp-tt-duration-group input,
.sp-tt-duration-group select {
  width: 78px;
  max-width: 78px;
}

.sp-tt-time-separator {
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
}

.sp-tt-text-group input {
  max-width: none;
  font-family: "Noto Sans JP", sans-serif;
}

.sp-tt-table-buttons {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.sp-tt-round-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: filter 0.18s ease;
}

.sp-tt-round-btn:hover {
  filter: brightness(1.08);
}

.sp-tt-round-btn .material-icons {
  font-size: 24px;
  line-height: 1;
}

.sp-tt-round-btn-add {
  background: linear-gradient(to right, #7b3fe4, #a855f7);
}

.sp-tt-round-btn-delete {
  background: linear-gradient(to right, #6c6c6c, #8d8d8d);
}

.sp-tt-bottom-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.sp-tt-preview-card {
  display: flex;
  flex-direction: column;
}

.sp-tt-result-area {
  position: relative;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 8px;
  flex: 1 1 auto;
}

.sp-tt-result-area:focus-within {
  border-color: var(--cta);
}

.sp-tt-preview-wrap {
  position: relative;
}

.sp-tt-preview-wrap pre {
  background: #f5f5f5;
  border-radius: 8px;
  margin: 0;
  min-height: 180px;
  padding: 14px;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  color: #333;
  cursor: text;
  overflow: auto;
}

.sp-tt-preview-wrap pre:focus {
  outline: none;
}

.sp-tt-export-row {
  margin-top: auto;
  padding-top: 17px;
  display: flex;
  gap: 10px;
}

.sp-tt-export-row .btn-export {
  flex: 1 1 0;
}

.sp-tt-display-card {
  align-self: start;
}

.sp-tt-settings-body {
  display: grid;
  gap: 12px;
  margin-top: 17px;
}

.sp-tt-settings-group {
  display: grid;
  gap: 8px;
}

.sp-tt-settings-group-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
  font-family: var(--mono);
}

.sp-tt-check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 18px;
  cursor: pointer;
}

.sp-tt-check-line span {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.35;
}

.sp-tt-setting-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.sp-tt-setting-row label {
  font-size: 14px;
  color: var(--ink);
}

.sp-tt-setting-row select {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 16px;
  background: #fff;
  color: var(--ink);
}

#reset-btn:hover {
  background: transparent;
  border-color: var(--orange);
  color: var(--orange);
}

@media (min-width: 960px) {
  header .header-inner,
  footer .inner {
    max-width: 1120px;
  }

  .sp-tt-bottom-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.72fr);
    align-items: stretch;
  }

  .sp-tt-preview-wrap pre {
    min-height: 320px;
  }
}

@media (max-width: 650px) {
  .sp-tt-description-break {
    display: none;
  }
}

@media (max-width: 480px) {
  .sp-tt-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .sp-tt-card {
    padding: 20px;
  }

  .sp-tt-field {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .sp-tt-field-control {
    padding-left: 12px;
  }

  .sp-tt-time-group input,
  .sp-tt-time-group select {
    width: 60px;
    max-width: 60px;
  }

  .sp-tt-export-row {
    flex-direction: column;
  }
}
