:root {
  --dark: #393E46;
  --panel-bg: #F7F7F7;
  --page-bg: #EEEEEE;
  --badge-bg: #C3C9D6;
  --muted: #929AAB;
  --red: #B84B48;
  --white: #FFFFFF;
}

* { box-sizing: border-box; }

html {
  font-size: 13px;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background:
    radial-gradient(circle at 18% 12%, #f6f6f6, transparent 45%),
    radial-gradient(circle at 85% 88%, #e6e6ea, transparent 50%),
    var(--page-bg);
  color: var(--dark);
  font-family: 'Lexend Deca', sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  padding: 40px 20px;
}

a { color: inherit; }

.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

/* ---------- Centering ---------- */
/* margin:auto (not justify-content:center) so tall panels never clip
   off the top of the viewport when they exceed its height */

.site-center {
  margin: auto;
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-wrap {
  position: relative;
  width: 100%;
}

.browser-frame {
  position: relative;
  width: 100%;
  background: var(--panel-bg);
  border-radius: 0 14px 14px 14px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(35, 38, 45, 0.16), 0 2px 8px rgba(35, 38, 45, 0.06);
}

.browser-chrome {
  background: var(--dark);
  color: var(--white);
  padding: 8px 12px 0;
}

.browser-tab {
  width: 30%;
  min-width: 150px;
  margin-left: 0;
  position: relative;
  z-index: 1;
}

/* Chrome-style tab: same colour as the toolbar, with flared bottom corners */
.chrome-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Lexend Deca', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  padding: 9px 12px;
  background: var(--dark);
  color: var(--white);
  border-radius: 10px 10px 0 0;
}
.chrome-top::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle at var(--cx) 0, transparent 10px, var(--dark) 10.5px);
}
.chrome-top::after { right: -10px; --cx: 100%; }
.chrome-top .icon { font-size: 1.1em; }
.chrome-top span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tab-close {
  width: 12px;
  height: 12px;
  opacity: 0.6;
  flex-shrink: 0;
}

.chrome-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 4px 0 6px;
}
.chrome-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.chrome-btn svg { width: 16px; height: 16px; }
.chrome-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); }
.url-star {
  margin-left: auto;
  display: flex;
  opacity: 0.7;
}
.url-star svg { width: 15px; height: 15px; }

.chrome-signin {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  padding: 5px 12px;
  border: 0;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-family: 'Lexend Deca', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.chrome-signin:hover { background: rgba(255, 255, 255, 0.2); }
.chrome-signin svg { width: 15px; height: 15px; }
@media (max-width: 620px) {
  .chrome-signin span { display: none; }
  .chrome-signin { padding: 6px; }
}

.chrome-btn:disabled { opacity: 0.35; cursor: default; }

.chrome-url {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-radius: 40px;
  padding: 7px 16px;
  font-family: 'Lexend Deca', sans-serif;
  font-weight: 400;
  font-size: 0.85rem;
  margin: 0 0 0 4px;
  cursor: default;
}
.chrome-url .icon { font-size: 0.9em; opacity: 0.7; }

/* Chrome-style bookmark bar */
.chrome-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0 8px 10px;
  font-family: 'Lexend Deca', sans-serif;
}

.chrome-nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

.chrome-nav a,
.bookmark-all {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 14px;
  border-radius: 6px;
  color: var(--white);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.chrome-nav a:hover,
.chrome-nav a.active {
  background: rgba(255, 255, 255, 0.14);
}

.bookmark-all {
  margin-left: auto;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0 6px 6px 0;
  color: rgba(255, 255, 255, 0.85);
  cursor: default;
}

/* ---------- Content ---------- */

.content {
  padding: 34px 38px;
  min-height: 320px;
}

.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

h1, h2, h3 {
  font-family: 'Press Start 2P', monospace;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 20px;
}

h1 { font-size: 1.3rem; }
h2 { font-size: 1rem; }
h3 { font-size: 0.8rem; margin-bottom: 16px; }

mark {
  background: var(--badge-bg);
  color: var(--dark);
  font-family: 'Lexend Deca', sans-serif;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
}

hr.dashed {
  border: none;
  border-top: 2px dashed var(--dark);
  opacity: 0.25;
  margin: 22px 0;
}

/* ---------- Home ---------- */

.home-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.portrait {
  width: 190px;
  height: 190px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.home-text {
  flex: 1;
  min-width: 0;
}

.intro {
  margin: 0 0 10px;
  font-weight: 700;
}

.home-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.home-buttons .btn-block {
  margin: 0;
  padding: 7px 12px;
  background: transparent;
  color: var(--dark);
  border: 1.5px solid var(--dark);
  transition: background 0.15s ease, color 0.15s ease;
}
.home-buttons .btn-block:hover {
  background: var(--dark);
  color: var(--white);
}

/* ---------- Gallery ---------- */

.gallery-grid {
  column-count: 3;
  column-gap: 12px;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 12px;
  border-radius: 6px;
  break-inside: avoid;
}

/* ---------- Commission ---------- */

.status-line {
  font-weight: 700;
  margin-top: 0;
}
.status-closed {
  color: var(--red);
  font-family: 'Lexend Giga', sans-serif;
  letter-spacing: 1px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.diamond-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.diamond-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
}
.diamond-list li::before {
  content: '\25C6';
  position: absolute;
  left: 0;
  color: var(--muted);
  font-size: 0.7em;
  top: 0.4em;
}

#notify-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#notify-form input {
  padding: 10px 14px;
  border: 1px solid var(--muted);
  border-radius: 6px;
  font-family: 'Lexend Deca', sans-serif;
  font-size: 0.85rem;
  background: var(--white);
  color: var(--dark);
}
#notify-form input::placeholder {
  color: var(--muted);
}
#notify-form button {
  padding: 12px 14px;
  border: none;
  border-radius: 6px;
  background: var(--dark);
  color: var(--white);
  font-family: 'Lexend Deca', sans-serif;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.75rem;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
#notify-form button:hover {
  opacity: 0.85;
}
.form-note {
  margin: 0;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dark);
}

/* ---------- TOS ---------- */

.update-badge {
  display: inline-block;
  background: var(--badge-bg);
  padding: 3px 8px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.8rem;
}

.btn-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--dark);
  color: var(--white);
  text-decoration: none;
  padding: 12px;
  border-radius: 6px;
  margin: 20px 0;
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 0.8rem;
}

.notice-block {
  background: var(--badge-bg);
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 700;
  text-align: center;
  margin: 20px 0;
}

.tos-footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.tos-footer-links a {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--dark);
  color: var(--white);
  text-decoration: none;
  padding: 12px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 0.75rem;
  text-align: center;
}

/* ---------- Footer & decoration ---------- */

.site-footer {
  text-align: center;
  padding-top: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 0.75rem;
  color: var(--muted);
}

.decoration {
  position: absolute;
  right: -60px;
  bottom: -70px;
  width: 130px;
  pointer-events: none;
  z-index: 5;
}

/* ---------- Responsive ---------- */

@media (max-width: 620px) {
  body {
    padding: 28px 14px;
  }
  .content {
    padding: 26px 22px;
  }
  .chrome-nav a span {
    display: none;
  }
  .bookmark-all {
    display: none;
  }
  .home-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .two-col {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .gallery-grid {
    column-count: 2;
  }
  .decoration {
    width: 90px;
    right: -14px;
    bottom: -14px;
    opacity: 0.6;
  }
}

@media (max-width: 420px) {
  .gallery-grid {
    column-count: 2;
  }
  h1 { font-size: 1.15rem; }
}
