@import url("https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;600;700;800;900&display=swap");
:root {
  --primary: #fed100;
  --primary-soft: rgba(254, 209, 0, 0.18);
  --bg-soft: #fbf6e8;
  --card: #fffaf0;
  --text: #191507;
  --muted: #706b5c;
  --border: rgba(32, 32, 32, 0.12);
  --shadow: 0 18px 50px rgba(32, 32, 32, 0.08);
  --shadow-soft: 0 10px 28px rgba(32, 32, 32, 0.06);
  --category-notion: #191507;
  --category-sheets: #299764;
  --category-folders: #ffbf43;
  --category-links: #f76808;
  --category-unassigned: #cac9be;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Google Sans", Arial, Helvetica, sans-serif;
  color: var(--text);
  min-height: 100vh;
  /* background: var(--bg-soft); */
  background: #fafafa;
}

a {
  color: inherit;
}

button,
input,
textarea,
select,
kbd {
  font: inherit;
}

.app-shell {
  width: min(90%, 1320px);
  margin: 0 auto;
  padding: 22px 0 44px;
}

.app-footer {
  width: fit-content;
  margin: 50px auto 0;
  background-image: linear-gradient(
    110deg,
    rgba(112, 107, 92, 0.48) 0%,
    rgba(112, 107, 92, 0.48) 40%,
    #ffffff 50%,
    rgba(112, 107, 92, 0.48) 60%,
    rgba(112, 107, 92, 0.48) 100%
  );
  background-size: 240% 100%;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 3px;
  text-align: center;
  text-transform: uppercase;
  opacity: 0.5;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: footer-shine 5s linear infinite;
}

@keyframes footer-shine {
  from {
    background-position: 180% 0;
  }

  to {
    background-position: -180% 0;
  }
}

.topbar {
  display: grid;
  grid-template-columns: 190px 1fr auto;
  gap: 30px;
  align-items: center;
  margin-bottom: 22px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  width: 190px;
  max-height: 58px;
  object-fit: contain;
  display: block;
}

.quote-strip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  color: var(--muted);
  padding: 12px 22px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  overflow-x: hidden;
  overflow-y: hidden;
  scrollbar-width: none;
  text-align: center;
  line-height: 1.5;
  touch-action: pan-y;
  user-select: none;
  white-space: nowrap;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.quote-strip::-webkit-scrollbar {
  display: none;
}

.quote-strip.quote-strip-marquee {
  justify-content: flex-start;
  cursor: grab;
}

.quote-strip.quote-strip-dragging {
  cursor: grabbing;
}

#quoteText {
  display: inline-block;
  max-width: 100%;
  opacity: 1;
  transition: opacity 0.18s ease;
  font-size: 16px;
  font-weight: 450;
  letter-spacing: 0.5px;
  white-space: nowrap;
  will-change: transform;
}

.quote-strip.quote-strip-marquee #quoteText {
  max-width: none;
}

#quoteText.fade-out {
  opacity: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: -15px;
}

.top-icon-link {
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.top-icon-link:active {
  transform: scale(0.96);
}

.top-icon-link-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
}

.top-icon-link-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.top-icon-link-icon svg [fill="#000"] {
  fill: currentColor;
}

.profile-button {
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease;
}

.profile-button:active {
  transform: scale(0.96);
}

.profile-menu {
  position: relative;
}

.profile-image {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 190px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 20;
  display: none;
}

.profile-dropdown svg {
  color: var(--primary);
}

.profile-dropdown.is-open {
  display: block;
}

.dropdown-greeting {
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 300;
  color: var(--muted);
}

.profile-dropdown a {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  padding: 10px 11px;
  border-radius: 12px;
  font-size: 15px;
}

.profile-dropdown svg {
  width: 17px;
  height: 17px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.link-card,
.tool-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  box-shadow: var(--shadow-soft);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.card-title svg {
  width: 19px;
  height: 22px;
  color: var(--primary);
  stroke-width: 2;
}

.card-title h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.5;
  font-weight: 500;
}

.card-title-link {
  color: inherit;
  text-decoration: none;
}

.muted-title {
  opacity: 0.55;
}

.link-button-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.link-button {
  position: relative;
  min-width: 0;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 11px 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease;
}

.link-button:active {
  transform: scale(0.97);
}

.link-button-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.link-button-label span {
  min-width: 0;
  /* overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap; */
}

.link-button-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--muted);
  opacity: 0.85;
  stroke-width: 2;
  opacity: 0.46;
}

.link-button-icon-mask {
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: var(--icon-mask-url) center / contain no-repeat;
  mask: var(--icon-mask-url) center / contain no-repeat;
}

.link-button-meta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 16px;
}

.link-category-marker {
  position: absolute;
  top: -3.9px;
  right: 15px;
  width: 12px;
  height: 12px;
  fill: currentColor;
  stroke-width: 1.8;
}

.link-category-marker-notion {
  color: var(--category-notion);
}

.link-category-marker-sheets {
  color: var(--category-sheets);
}

.link-category-marker-folders {
  color: var(--category-folders);
}

.link-category-marker-links {
  color: var(--category-links);
}

.link-category-marker-unassigned,
.link-category-marker-default {
  color: var(--category-unassigned);
}

/* .link-button kbd {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px 6px;
  font-size: 11px;
  color: var(--muted);
  min-width: 28px;
  text-align: center;
} */

.link-button kbd {
  font-size: 12px;
  color: var(--muted);
  min-width: 11px;
  text-align: center;
  opacity: 0.46;
}

.tool-help {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.primary-action {
  width: 100%;
  border: 0;
  border-radius: 15px;
  padding: 13px 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    filter 0.16s ease;
}

.primary-action:active {
  transform: scale(0.98);
}

.result-box {
  margin-top: 14px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 10px 11px;
  color: var(--text);
  font-weight: 750;
  word-break: break-all;
}

.copy-button {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--card);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.copy-button svg {
  width: 17px;
  height: 17px;
}

.micro-status {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.text-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 13px 14px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.line-break-input {
  min-height: 116px;
  resize: vertical;
}

.line-break-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.line-break-action {
  flex: 1;
  min-width: 0;
}

.line-break-copy-button {
  height: 46px;
  width: 46px;
  flex-basis: 46px;
}

.numerology-result {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.number-badge {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: var(--text);
  font-size: 32px;
  font-weight: 900;
  border: 1.5px solid var(--primary);
}

.calculation-line {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  word-break: break-word;
}

.calculation-total {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  margin-right: 6px;
}

.calculation-breakdown {
  color: var(--muted);
}

.empty-card {
  min-height: 220px;
  border-style: dashed;
  opacity: 0.75;
}

/* Login */

.login-body {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  align-items: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 390px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 34px;
  margin-bottom: 50px;
}

.login-footer {
  margin-top: 0;
}

.login-logo {
  display: block;
  width: 230px;
  max-height: 70px;
  object-fit: contain;
  margin: 0 auto 30px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 15px;
  font-size: 15px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.login-form button {
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  margin-top: 10px;
}

.login-form button:active {
  transform: scale(0.98);
}

.alert-error {
  background: #fff0f0;
  border: 1px solid #ffd0d0;
  color: #a40000;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
}

/* Settings */

.settings-shell {
  width: min(90%, 1320px);
  margin: 0 auto;
  padding: 22px 0 44px;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.back-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 15px;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  box-shadow: var(--shadow-soft);
}

.back-button svg {
  width: 17px;
  height: 17px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  align-items: start;
}

.settings-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.settings-card h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.settings-side-stack {
  display: grid;
  gap: 18px;
}

.bookmark-help-card .card-title {
  margin-bottom: 14px;
}

.bookmark-help-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bookmark-help-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.bookmark-help-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: currentColor;
  stroke-width: 1.8;
}

.settings-help {
  margin: -4px 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.settings-form {
  display: grid;
  gap: 13px;
}

.settings-form textarea,
.settings-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 13px 14px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  resize: vertical;
}

.settings-link-button {
  display: block;
  text-align: center;
  text-decoration: none;
}

.alert-success {
  background: rgba(31, 143, 80, 0.12);
  border: 1px solid rgba(31, 143, 80, 0.28);
  color: #1f8f50;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 650;
}

.profile-button {
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.profile-image {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.card-title-split {
  justify-content: space-between;
}

.card-title-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.password-card {
  padding-bottom: 18px;
}

.password-card .card-title {
  margin-bottom: 14px;
}

.password-result-box {
  margin-top: 0;
  background: #ffffff;
}

.password-text-button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 500;
  cursor: pointer;
  padding: 7px 2px;
  word-break: break-all;
  letter-spacing: 5px;
}

.password-text-button:active {
  transform: scale(0.99);
}

.copy-button {
  color: var(--muted);
}

@media (max-width: 900px) {
  .settings-shell {
    width: 100%;
    padding: 14px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-header {
    align-items: flex-start;
  }

  .settings-actions {
    flex-shrink: 0;
  }
}

@media (max-width: 1100px) {
  .app-shell {
    width: min(92%, 1320px);
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    grid-template-columns: 150px 1fr auto;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: 100%;
    padding: 14px 14px 34px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .top-actions {
    margin-left: 0;
  }

  .brand-logo {
    width: 190px;
  }

  .quote-strip {
    grid-column: 1 / -1;
    order: 3;
    min-height: 46px;
    padding: 11px 16px;
    border-radius: 99px;
  }

  .quote-strip #quoteText {
    max-width: 91%;
    font-size: 14px;
    line-height: 1.45;
  }

  .link-button kbd {
    display: none;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tool-card {
    order: 20;
  }

  .link-card,
  .tool-card {
    border-radius: 20px;
    padding: 17px;
  }

  .card-title h2 {
    font-size: 14px;
  }

  .card-title svg {
    width: 17px;
    height: 17px;
  }

  .numerology-card .field-label {
    font-size: 12px;
  }

  .settings-help {
    font-size: 12px;
  }

  .bookmark-help-list {
    grid-template-columns: 1fr;
  }

  .link-category-marker {
    top: -3px;
  }

  .link-button-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .link-button {
    min-height: 46px;
    font-size: 16px;
  }

  .profile-dropdown {
    right: 0;
  }
}

/* .link-button-meta {
  display: none;
} */
