 :root {
  --bg: #f4f1ec;
  --panel: #ffffff;
  --ink: #1f1d1a;
  --accent: #0d9488;
  --accent-dark: #0f766e;
  --muted: #6d665d;
  --border: #ded6cc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  color: var(--ink);
  background: linear-gradient(120deg, #f4f1ec 0%, #eef7f5 100%);
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 32px;
  background: #fff8ef;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  letter-spacing: 1px;
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.tools-menu {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.tools-menu a {
  text-decoration: none;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 14px;
}

.tools-menu a.active {
  color: var(--accent);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  padding: 24px 32px 40px;
}

.panel {
  background: var(--panel);
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.05);
}

.panel-head {
  margin-bottom: 14px;
}

.panel-head h2 {
  margin: 0 0 6px;
}

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

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tab,
.action-btn {
  border: 1px solid var(--border);
  background: #fffdf8;
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
}

.tab.active,
.action-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.action-group {
  display: none;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.action-group.active {
  display: flex;
}

.action-btn {
  width: auto;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.callout {
  padding: 12px 14px;
  border-radius: 12px;
  background: #eef7f5;
  color: var(--accent-dark);
  font-size: 13px;
  line-height: 1.4;
  border: 1px solid #cfe7e1;
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

input,
select,
button {
  font-family: inherit;
}

input,
select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fffdf8;
}

button.primary {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(13, 148, 136, 0.25);
}

.status {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.result a {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
  }

  .workspace {
    padding: 16px 18px 32px;
  }

  button.primary {
    width: 100%;
  }
}
