:root {
  --bg: #dedfdd;
  --surface: rgba(250, 250, 247, 0.5);
  --ink: #1d1d1b;
  --muted: #6d6d69;
  --line: #c9cac6;
  --accent: #242522;
  --accent-hover: #4a4b47;
  --yellow: #eabf31;
  --green: #526c58;
  --shadow: 0 18px 42px rgba(35, 37, 34, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(224, 228, 225, 0.08), rgba(238, 240, 236, 0.16)),
    url("./mcd1.webp") center 30% / cover fixed;
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

.app {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 18px;
}

.header,
.toolbar,
.sectionTitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.header {
  position: relative;
  justify-content: center;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background: rgba(248, 249, 246, 0.5);
  box-shadow: var(--shadow);
}

.kicker {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.78rem;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 11em;
  font-size: clamp(2.1rem, 7vw, 4.2rem);
  line-height: 1.05;
  text-align: center;
}

h2 {
  font-size: 1.08rem;
}

.dateBadge {
  position: absolute;
  right: 20px;
  flex: 0 0 auto;
  max-width: 138px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 9px 10px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.hero {
  display: grid;
  gap: 14px;
  max-width: 560px;
  margin: 18px auto 0;
}

.loginCard,
.ownerPanel,
.accountCard,
.queue {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.loginCard,
.ownerPanel,
.queue {
  padding: 16px;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

input,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(36, 37, 34, 0.12);
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-hover);
}

button:disabled {
  background: #c9c1b7;
  cursor: not-allowed;
}

.ghost {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.ghost:hover {
  background: #e9eae6;
}

.workspace {
  margin-top: 18px;
}

.toolbar {
  margin-bottom: 12px;
}

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

.accountGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.accountCard {
  overflow: hidden;
}

.accountMain {
  padding: 15px;
}

.accountMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.pill {
  border-radius: 999px;
  padding: 6px 9px;
  background: #f2eee7;
  color: var(--muted);
  font-size: 0.8rem;
}

.quota {
  height: 8px;
  margin: 14px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee8df;
}

.quota span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
}

.accountActions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.requestNote {
  min-height: 70px;
}

.queue {
  margin-top: 14px;
}

.requestList {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.requestItem {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 252, 0.84);
}

.requestItem strong {
  display: block;
  margin-bottom: 5px;
}

.requestItem p {
  color: var(--muted);
  line-height: 1.45;
}

.ownerPanel {
  margin: 16px 0 28px;
  line-height: 1.55;
}

.ownerPanel h2 {
  margin-bottom: 8px;
}

.messageAccess {
  display: flex;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.messageAccess label {
  flex: 1;
  margin-bottom: 0;
}

.messageStatus {
  min-height: 1.4em;
  margin-top: 10px;
  color: var(--muted);
}

.requestStatus {
  min-height: 1.4em;
  margin-top: 10px;
  color: var(--accent);
  font-weight: 700;
}

.messageList {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.messageItem p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .dateBadge {
    position: static;
  }

  .header {
    align-items: flex-start;
  }

  .messageAccess {
    display: grid;
    align-items: stretch;
  }
}

@media (min-width: 760px) {
  .app {
    padding: 28px;
  }

  h1 {
    max-width: none;
  }

  .accountGrid {
    grid-template-columns: repeat(3, 1fr);
  }
}
