/* App-specific layouts */

/* Finder */
.finder-toolbar-extras {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.finder-nav {
  display: flex;
  gap: 4px;
}

.finder-nav button {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  font-size: 14px;
}

.finder-nav button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.finder-search {
  height: 28px;
  border-radius: 8px;
  border: none;
  padding: 0 10px;
  width: 160px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-size: 12px;
  outline: none;
}

.finder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  padding: 18px;
}

.finder-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-dim);
  transition: background 0.15s;
}

.finder-file:hover,
.finder-file.selected {
  background: var(--accent-soft);
  color: var(--text);
}

.finder-file .fi {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.08);
}

/* Safari */
.safari-toolbar {
  gap: 8px !important;
}

.safari-nav {
  display: flex;
  gap: 4px;
}

.safari-nav button {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.safari-url {
  flex: 1;
  height: 30px;
  border-radius: 9px;
  border: none;
  padding: 0 14px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 13px;
  text-align: center;
  outline: none;
}

.safari-url:focus {
  text-align: left;
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.safari-page {
  height: 100%;
  overflow: auto;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(196, 90, 44, 0.18), transparent 50%),
    #141a22;
}

.safari-start {
  max-width: 880px;
  margin: 0 auto;
  padding: 36px 28px 48px;
}

.safari-hero {
  text-align: center;
  margin-bottom: 36px;
}

.safari-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 650;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 20%, #e8894a 60%, #9bb4c8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.safari-hero p {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 15px;
}

.safari-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.safari-card {
  padding: 18px;
  border-radius: 16px;
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.25s var(--ease-out), background 0.2s;
}

.safari-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.1);
}

.safari-card .emoji {
  font-size: 28px;
  margin-bottom: 10px;
}

.safari-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.safari-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.safari-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 28px 60px;
  line-height: 1.65;
}

.safari-article h1 {
  font-size: 32px;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.safari-article .meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.safari-article p {
  margin-bottom: 16px;
  color: var(--text-dim);
  font-size: 15px;
}

/* System Settings */
.settings-content {
  padding: 24px 28px;
}

.settings-pane h2 {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.settings-pane .lead {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 24px;
}

.settings-group {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 18px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-row .label {
  font-size: 13px;
  font-weight: 500;
}

.settings-row .desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.glass-demo {
  height: 120px;
  border-radius: 14px;
  margin-top: 8px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 560;
  overflow: hidden;
  position: relative;
}

.glass-demo::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, #c45a2c, #1a3a52),
    repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.05) 10px, rgba(255,255,255,0.05) 20px);
  z-index: 0;
}

.glass-demo span {
  position: relative;
  z-index: 1;
  padding: 12px 20px;
  border-radius: 12px;
}

/* `.toggle` is a liquid obround switch — see css/switch.css. */

.about-hero {
  text-align: center;
  padding: 32px 20px;
}

.about-hero .chip {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, #e8894a, #c45a2c 50%, #1a3a52);
  display: grid;
  place-items: center;
  font-size: 28px;
  box-shadow: 0 12px 30px rgba(196, 90, 44, 0.35);
}

.about-hero h2 {
  font-size: 20px;
  margin-bottom: 4px;
}

.about-meta {
  margin-top: 20px;
  text-align: left;
}

.about-meta .settings-row .label {
  color: var(--text-muted);
  font-weight: 400;
}

/* Notes */
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.note-item {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.04);
}

.note-item:hover,
.note-item.active {
  background: var(--accent-soft);
}

.note-item h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.note-item p {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notes-editor {
  height: 100%;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
}

.notes-editor input.title {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.notes-editor .date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.notes-editor textarea {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  resize: none;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
  font-family: inherit;
}

/* Calculator — Sonoma flat keypad */
.calc-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #1c1c1e;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.calc-display {
  flex: 0 0 auto;
  min-height: 78px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 18px 16px 10px;
  font-size: 48px;
  font-weight: 200;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  color: #fff;
  background: #2c2c2e;
}

.calc-keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  flex: 1;
  background: #000;
  min-height: 0;
}

.calc-key {
  aspect-ratio: auto;
  border-radius: 0;
  font-size: 22px;
  font-weight: 420;
  background: #4a4a4c;
  color: #fff;
  transition: filter 0.1s;
}

.calc-key:active {
  filter: brightness(1.2);
}

.calc-key.fn {
  background: #636366;
  color: #fff;
}

.calc-key.op {
  background: #ff9f0a;
  color: #fff;
}

.calc-key.zero {
  grid-column: span 2;
  border-radius: 0;
  aspect-ratio: auto;
  height: 100%;
}

/* Music mini */
.music-now {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px;
  background:
    radial-gradient(circle at 30% 20%, rgba(196, 90, 44, 0.35), transparent 50%),
    #161b24;
}

.music-art {
  width: 200px;
  height: 200px;
  border-radius: 16px;
  background: linear-gradient(145deg, #e8894a, #c45a2c, #1a3a52);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.music-art::after {
  content: "GG";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
}

.music-meta {
  text-align: center;
}

.music-meta h3 {
  font-size: 18px;
  font-weight: 600;
}

.music-meta p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.music-controls {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 22px;
}

.music-bar {
  width: min(280px, 80%);
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.music-bar span {
  display: block;
  height: 100%;
  width: 38%;
  background: #fff;
  border-radius: inherit;
  animation: music-progress 24s linear infinite;
}

/* Terminal */
.term-body {
  height: 100%;
  background: rgba(8, 10, 14, 0.92);
  padding: 14px 16px;
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  color: #d4e0ea;
  overflow: auto;
}

.term-line .prompt {
  color: #30d158;
}

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

.term-input-line input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #d4e0ea;
  font: inherit;
}
