:root {
  --bg: #06080f;
  --bg-2: #0b1020;
  --panel: #111a30;
  --panel-2: #0d1528;
  --panel-3: #10192c;
  --line: rgba(180, 210, 235, .14);
  --text: #e9eef6;
  --muted: #93a4bd;
  --silver: #c8d6e6;
  --accent: #4fd0d6;
  --accent-2: #2b7cff;
  --gold: #e7b765;
  --danger: #ef6464;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 0 18px 52px;
  background:
    radial-gradient(900px 420px at 82% -10%, rgba(43, 124, 255, .18), transparent 62%),
    radial-gradient(740px 460px at 8% 12%, rgba(79, 208, 214, .12), transparent 64%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.75;
  letter-spacing: .02em;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.en {
  font-family: "Oswald", Impact, sans-serif;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
  margin: 0 -18px;
  padding: 14px 22px;
  background: rgba(6, 8, 15, .86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 10px;
  text-decoration: none;
}

.brand-cluster {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1 1 auto;
  min-width: 0;
  gap: 14px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(200, 214, 230, .36);
}

.brand-title {
  display: block;
  color: #fff;
  font-family: "Oswald", Impact, sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.brand-title small {
  display: block;
  margin-top: 2px;
  color: var(--silver);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: none;
}

.brand-provider {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: .12em;
}

.help-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(79, 208, 214, .34);
  border-radius: 999px;
  color: var(--accent);
  padding: 7px 13px;
  background: rgba(79, 208, 214, .08);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: .25s var(--ease);
  white-space: nowrap;
}

.help-link:hover,
.help-link.current {
  border-color: rgba(79, 208, 214, .58);
  background: rgba(79, 208, 214, .15);
  color: #fff;
}

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

.site-link,
.top-link,
.button,
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--silver);
  border-radius: 999px;
  background: transparent;
  color: var(--silver);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition: .25s var(--ease);
  white-space: nowrap;
}

.site-link {
  flex: 0 0 auto;
}

.top-link {
  flex: 0 0 auto;
}

.tool-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 5px;
  padding: 2px 4px;
  border: 1px solid rgba(200, 214, 230, .12);
  border-radius: 999px;
  background: rgba(13, 21, 40, .68);
}

.tool-nav-label {
  align-self: center;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  color: var(--muted);
  font-size: 10px;
  justify-content: flex-start;
  line-height: 1;
  min-height: 34px;
  padding: 0 5px 0 8px;
}

.tool-nav .top-link {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  line-height: 1;
}

.top-link.wrap {
  line-height: 1.08;
  white-space: normal;
}

.top-link:hover,
.site-link:hover,
.button:hover,
.file-button:hover {
  background: var(--silver);
  color: var(--bg);
}

.top-link.primary,
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.top-link.current {
  border-color: rgba(79, 208, 214, .52);
  background: rgba(79, 208, 214, .14);
  color: var(--accent);
}

.button.ghost {
  border-color: rgba(79, 208, 214, .36);
  color: var(--accent);
}

.button.danger {
  border-color: rgba(239, 100, 100, .55);
  color: var(--danger);
}

.page-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 20px 0 0;
}

.hero-panel,
.default-guide,
.tool-panel,
.section {
  border: 1px solid var(--line);
  background: rgba(17, 26, 48, .86);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .22);
}

.default-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: 8px;
}

.default-guide[hidden] {
  display: none;
}

.default-guide p {
  margin: 0;
  color: var(--silver);
  font-size: 13px;
  line-height: 1.75;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: 8px;
}

.hero-panel.compact {
  grid-template-columns: 1fr;
}

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  margin-bottom: 6px;
}

.hero-panel h1,
.tool-panel h2 {
  margin: 0;
  color: #fff;
  line-height: 1.25;
}

.hero-panel h1 {
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: .01em;
}

.hero-panel p,
.panel-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-status {
  min-width: 176px;
  padding: 9px 12px;
  border: 1px solid rgba(79, 208, 214, .24);
  border-radius: 8px;
  background: rgba(79, 208, 214, .07);
  text-align: right;
}

.hero-status strong {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 7px;
  color: #fff;
  font-family: "Oswald", Impact, sans-serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .06em;
  white-space: nowrap;
}

.status-slash {
  color: var(--muted);
  font-size: 17px;
  letter-spacing: 0;
}

.status-label {
  color: var(--silver);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.tool-panel {
  padding: 18px;
  border-radius: 8px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.panel-actions.start {
  justify-content: flex-start;
  margin-top: 12px;
}

.panel-head h2 {
  font-size: 22px;
}

.progress-track {
  height: 7px;
  margin: 9px 0 0;
  border-radius: 999px;
  background: rgba(200, 214, 230, .12);
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .2s var(--ease);
}

.list-select {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.list-group-label {
  color: var(--muted);
  font-size: 10px;
  margin: 0 0 8px;
}

.list-select.vertical {
  display: grid;
  margin-bottom: 16px;
}

.list-tab {
  min-height: 38px;
  border: 1px solid rgba(200, 214, 230, .22);
  border-radius: 999px;
  background: rgba(13, 21, 40, .78);
  color: var(--silver);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

.list-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.sections {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.new-list-strip,
.backup-strip {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.new-list-strip + .backup-strip {
  margin-top: 14px;
}

.backup-panel {
  display: grid;
  gap: 12px;
}

.backup-panel h2 {
  margin: -5px 0 0;
  color: #fff;
  font-size: 25px;
  line-height: 1.25;
}

.backup-button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.2;
}

.backup-button.csv {
  background: #0f766e;
}

.backup-button.json {
  background: var(--accent-2);
}

.backup-button:hover {
  color: #fff;
  filter: brightness(1.08);
}

.restore-label {
  margin-top: 2px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.restore-input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: #fff;
  padding: 12px;
  font-size: 16px;
  font-weight: 800;
}

.section {
  overflow: hidden;
  border-radius: 8px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(13, 21, 40, .82);
}

.section-title {
  margin: 0;
  color: #fff;
  font-size: 17px;
}

.section-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.items {
  display: grid;
}

.item-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 50px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
}

.item-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}

.item-row span {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.item-row.checked span {
  color: var(--muted);
  text-decoration: line-through;
}

.edit-shell {
  display: grid;
  gap: 14px;
  padding-bottom: 96px;
}

.management-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.editor-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.editor-nav {
  position: sticky;
  top: 92px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.field input,
.edit-section input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(200, 214, 230, .18);
  border-radius: 8px;
  background: rgba(6, 8, 15, .76);
  color: var(--text);
  padding: 8px 10px;
}

.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.edit-list {
  display: grid;
  gap: 12px;
}

.edit-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 21, 40, .48);
}

.edit-section-head,
.edit-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 42px;
  gap: 8px;
  align-items: center;
}

.edit-section-head {
  padding: 12px;
  background: rgba(79, 208, 214, .10);
  border-left: 3px solid var(--accent);
}

.edit-item {
  margin-left: 22px;
  padding: 9px 12px 9px 0;
  border-top: 1px solid var(--line);
  position: relative;
}

.edit-item::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(79, 208, 214, .22);
}

.edit-section-label,
.edit-item-label {
  display: grid;
  gap: 5px;
}

.edit-label-caption {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.edit-item .edit-label-caption {
  color: var(--muted);
}

.edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: 22px;
  padding: 9px 12px 12px 0;
  border-top: 1px solid var(--line);
}

.help-shell {
  padding-bottom: 28px;
}

.intro-panel,
.help-toc,
.help-section {
  margin-bottom: 12px;
}

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

.help-panel {
  display: grid;
  gap: 8px;
}

.help-panel h2 {
  font-size: 20px;
}

.help-panel h3 {
  margin: 14px 0 4px;
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
}

.help-panel p,
.help-panel li {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.help-panel ul,
.help-panel ol {
  display: grid;
  gap: 5px;
  margin: 6px 0 0;
  padding-left: 1.35em;
}

.help-panel li {
  padding-left: 2px;
}

.toc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toc-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(79, 208, 214, .32);
  border-radius: 999px;
  color: var(--accent);
  padding: 0 12px;
  background: rgba(79, 208, 214, .08);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.qa {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(200, 214, 230, .10);
}

.question {
  color: var(--silver);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.answer {
  margin-top: 3px !important;
}

.site-footer {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 26px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.footer-mark {
  color: var(--accent);
  font-size: 12px;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.footer-note {
  font-size: 12px;
}

.icon-button {
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 8px;
}

.move-controls {
  display: flex;
  gap: 6px;
}

.move-button {
  width: 36px;
  min-height: 36px;
  font-size: 15px;
}

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

.empty {
  padding: 24px 8px;
  color: var(--muted);
  text-align: center;
}

.empty-inline {
  color: var(--muted);
  font-size: 13px;
  padding: 4px 0;
}

.file-button {
  width: 100%;
  margin: 12px 0 8px;
}

.file-button.compact {
  width: auto;
  margin: 0;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 40;
  max-width: calc(100vw - 28px);
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(79, 208, 214, .28);
  border-radius: 8px;
  background: rgba(6, 8, 15, .94);
  color: #fff;
  padding: 10px 14px;
  transition: .2s var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.floating-return {
  position: fixed;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 35;
}

.floating-return-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid rgba(79, 208, 214, .45);
  border-radius: 999px;
  background: rgba(79, 208, 214, .94);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .34);
  color: var(--bg);
  padding: 0 18px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.floating-return-link:hover {
  background: #8ff4f7;
}

@media (max-width: 860px) {
  body {
    padding: 0 12px 104px;
  }

  .app-header {
    margin: 0 -12px;
    padding: 10px 12px;
  }

  .brand-cluster {
    align-items: flex-start;
  }

  .top-actions {
    align-items: center;
    justify-content: space-between;
  }

  .tool-nav {
    flex: 0 1 auto;
    min-width: 0;
    justify-content: center;
    border-radius: 999px;
    gap: 3px;
    padding: 2px 3px;
  }

  .tool-nav-label {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 5px 0 7px;
  }

  .hero-panel,
  .default-guide,
  .editor-layout,
  .management-grid {
    grid-template-columns: 1fr;
  }

  .default-guide {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-status {
    text-align: left;
  }

  .editor-nav {
    position: static;
  }

  .help-grid {
    grid-template-columns: 1fr;
  }

  .floating-return {
    left: 12px;
    right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom));
  }

  .floating-return-link {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .brand-cluster {
    align-items: flex-start;
    flex-direction: row;
    gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .brand-title {
    font-size: 15px;
  }

  .brand-provider {
    font-size: 9px;
  }

  .help-link {
    min-height: 34px;
    padding: 6px 11px;
    font-size: 11px;
  }

  .site-link,
  .top-link,
  .tool-nav-label {
    min-height: 32px;
    padding: 0 9px;
    font-size: 11px;
  }

  .tool-nav .top-link {
    min-height: 32px;
    padding: 0 9px;
    font-size: 11px;
  }

  .top-link.wrap {
    min-width: 58px;
    padding: 0 8px;
  }

  .hero-panel,
  .tool-panel {
    padding: 14px;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-actions {
    justify-content: stretch;
  }

  .panel-actions .button,
  .panel-actions .file-button {
    flex: 1 1 auto;
  }

  .button-grid {
    grid-template-columns: 1fr;
  }
}
