:root {
  color-scheme: light;
  --ink: #121417;
  --muted: #5b626f;
  --line: #d8dee8;
  --paper: #f7f8f5;
  --panel: #ffffff;
  --teal: #0e7c7b;
  --coral: #dd5e46;
  --gold: #f0b429;
  --shadow: 0 24px 80px rgba(20, 28, 38, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(14, 124, 123, 0.16), transparent 38%),
    linear-gradient(245deg, rgba(221, 94, 70, 0.14), transparent 34%),
    var(--paper);
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
}

.panel,
.viewer {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(216, 222, 232, 0.9);
  box-shadow: var(--shadow);
}

.panel {
  min-height: calc(100vh - 44px);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 42px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 5px;
  background: #15191f;
}

.mark span {
  border-radius: 4px;
}

.mark span:nth-child(1) {
  background: var(--teal);
}

.mark span:nth-child(2) {
  background: var(--gold);
}

.mark span:nth-child(3) {
  grid-column: 1 / -1;
  background: var(--coral);
}

h1 {
  margin: 0 0 28px;
  max-width: 9ch;
  font-size: clamp(3rem, 8vw, 5.9rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.search {
  display: grid;
  gap: 10px;
}

label {
  font-size: 0.94rem;
  color: var(--muted);
}

.bar {
  display: grid;
  grid-template-columns: 1fr 52px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0 18px;
  font: inherit;
  color: var(--ink);
  outline: none;
}

button {
  font: inherit;
}

.bar button {
  display: grid;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--line);
  color: #fff;
  background: var(--teal);
  cursor: pointer;
}

.bar button:hover {
  background: #0a6767;
}

.bar svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.mode {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.mode.active {
  border-color: #15191f;
  color: #fff;
  background: #15191f;
}

.status {
  min-height: 44px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.viewer {
  position: relative;
  min-height: calc(100vh - 44px);
  border-radius: 8px;
  overflow: hidden;
}

.viewer-top {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #15191f;
  color: #fff;
}

.viewer-top span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-top a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

iframe {
  width: 100%;
  height: calc(100% - 48px);
  min-height: calc(100vh - 92px);
  border: 0;
  background: #fff;
}

.empty {
  position: absolute;
  inset: 49px 0 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 22px;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(18, 20, 23, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(18, 20, 23, 0.05) 1px, transparent 1px),
    #fff;
  background-size: 34px 34px;
  text-align: center;
  color: var(--muted);
}

.empty.hidden {
  display: none;
}

.compass {
  width: min(46vw, 220px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--line);
  background:
    conic-gradient(from -45deg, var(--teal), var(--gold), var(--coral), var(--teal));
  mask: radial-gradient(circle, transparent 42%, #000 43%);
}

@media (max-width: 820px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .panel {
    min-height: auto;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.8rem, 18vw, 4.8rem);
  }

  .viewer,
  .panel {
    min-height: 420px;
  }

  iframe {
    min-height: 420px;
  }
}
