:root{
  --brown: #452121;
  --green: #D3E6BF;
}

body {
  margin: 0;
  font-family: Helvetica, sans-serif;
  background: var(--green);
  color: var(--brown);
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(211,230,191,0.7), transparent 45%),
    radial-gradient(circle at 80% 75%, rgba(69,33,33,0.12), transparent 50%),
    var(--green);
  transition: opacity 0.45s ease;
}

.splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-card {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.splash-logo {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(69,33,33,0.22);
}

.splash-title {
  letter-spacing: 0.08em;
  font-size: 24px;
}

.splash-subtitle {
  font-size: 13px;
  opacity: 0.75;
}

.splash-loader {
  width: 74px;
  height: 3px;
  margin-top: 4px;
  background: rgba(69,33,33,0.22);
  overflow: hidden;
  border-radius: 999px;
}

.splash-loader::before {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  background: var(--brown);
  animation: splashMove 1.1s infinite ease-in-out;
}

@keyframes splashMove {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(300%); }
}

/* TITLE */
h1 {
  text-align: center;
  font-size: 18.5vw;
  margin: -3vw 0 20px -2vw;
  font-weight: 400;
}

a{
  text-decoration: none;
  color: inherit;
}

/* GRID */
.feed{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-auto-rows: 10px;
  grid-auto-flow: dense;
  gap: 10px;
  padding: 10px;
}

.feed article {
  padding: 10px;
  grid-row-end: span 10;
  break-inside: avoid;
  margin-bottom: 48px;
}

article.no-image small{
  margin-top: 40px;
  display: block;
}

article.no-image h2{
    font-size: 48px;
}

/* WIDTHS */
.w-small { grid-column: span 1; }
.w-medium { grid-column: span 2; }
.w-large { grid-column: span 3; }

/* CONTENT */
img{
  width:100%;
}

h2{
  margin:10px 0;
  font-size:36px;
}

small{
  font-size:12px;
}

/* SIDEBAR */
.sidebar{
  position: fixed;
  right:0;
  top:0;
  width:250px;
  height:100%;
  background:var(--green);
  padding:10px;
  overflow:auto;
  border-left: 1px solid var(--brown);
}

/* ITEMS */
.feed-item,
.category-item{
  cursor:pointer;
  padding:5px;
  display: flex;
  justify-content: space-between;
}

.active{
  background:#ddd;
}

.toggle-btn {
  position: fixed;
  right: 15px;
  top: 15px;
  font-size: 22px;
  cursor: pointer;
  z-index: 100;
}

.sidebar {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar h3{
  border-bottom: 1px solid var(--brown);
}

button{
  background: none;
  border: none;
  border: 1px solid var(--brown);
  padding: 5px;
}

input{
  width: 80%;
}

.feed-item button,
.category-item button {
  background: none;
  border: none;
  cursor: pointer;
}

.feed-tools {
  display: grid;
  gap: 6px;
  margin: 8px 0 12px;
}

.mode-note {
  font-size: 12px;
  opacity: 0.8;
}

.install-hint {
  font-size: 12px;
  line-height: 1.3;
  opacity: 0.8;
}

.import-btn {
  border: 1px solid var(--brown);
  padding: 5px;
  text-align: center;
  cursor: pointer;
}

#opmlFileInput,
#profileFileInput {
  display: none;
}


/* IMAGE NODE */
.image-wrapper { position: relative; display:inline-block; }
.node {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background:white;
  border: 2px solid var(--brown);
  position: absolute;
  top: 10px;
  left: 10px;
  cursor: pointer;
  z-index:5;
  transition: transform 0.2s;
}
body.edit-mode .node { 
  transform: scale(1.5); 
}
.category-item.selected { background: #eef; }
.category-item.active { font-weight: bold; }

body.edit-mode .node:hover { 
  background-color: var(--green);
}

.highlight-large {
    outline: 3px solid rgba(69,33,33,0.4);
}

.highlight-medium {
    outline: 2px dashed rgba(69,33,33,0.3);
}

.category-item.dragging {
    opacity: 0.5;
}

@media (max-width: 900px) {
  .feed {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .w-small,
  .w-medium,
  .w-large {
    grid-column: span 1;
  }

  h2 {
    font-size: 30px;
  }

  article.no-image h2 {
    font-size: 36px;
  }

  .sidebar {
    width: 88vw;
    max-width: 360px;
    z-index: 150;
  }

  .toggle-btn {
    background: var(--green);
    border: 1px solid var(--brown);
    line-height: 1;
    padding: 6px 9px;
  }

  input {
    width: 100%;
    box-sizing: border-box;
  }
}